[Update 1.0 - 2015.03.13] Emergency Lights CLEO script by nyolc8

Started by nyolc8, February 08, 2015, 13:59

nyolc8

Thanks:) Well, I only published my gtasa mods on this forum only, but I planning to make a webpage for them.

nyolc8

The coming new advisor light with more bulb and with tweaked (1 and 2) and completely changed (3 and 4) functions:


Sorry for bad video quality, made with phone.

edit: for some stupid reason, the different lights (strobe,mainEL,advior) interfere eachother... and getting flickery. Stupid.... game.... :|

Petar

This is amazing. This is not synced in SAMP? If not, is it possible in the future to replace it with EML?

nyolc8

Thanks. It's not synced. How do you mean replace it with ELM? ELM is synced because ELM basically doesn't do anything, just blinking (by damaging and repairing them constantly) the headlights and rear lights (of course these are snyced in samp). The other extra emergency lights in ELM are using the headlights and rear lights as "source". And because those are synced, all ELM light is synced. This is why I did something totally different.

Now my problem with it btw (why I hasn't release the new advisor yet), is that the "corona creator" opcode somehow interfere with other "corona creator" opcode from another thread. And then it creates the coronas slowly somehow and make the lights flicker.

Maybe I'll try to seperate them into different files... maybe that will help.

nyolc8

seperating threads into different files didn't help... f*ck this shit...

SpazzBucket.

Take it easy :P modifying things to make them different than original will always cause problems, no matter what it is, there will be errors and conflicting and frustration, keep trying!  :like:
"The more you fail, the more you know.
When you lose you then try to gain.
The best lessons are learnt through pain"
Quote from: HoboHobo [30 Jan 20:40]:   "Since I don't do that whole guy thing" .... Ok guys, pack up the lemonade stand, she's not interested.
[hide=Alyssa White-Glutz hottest woman in metal]http://[/hide]
[hide=Lzzy Hale][/hide]
[hide=Renee Phoenix][/hide]
[hide=Good one Stteve]
Quote from: SpazzbucketI suddenly feel very smart
Quote from: StteveYou're extremely smart all the time, it just explodes sometimes
Quote from: StteveSo we're volcanoes
[/hide][hide=Other true/clever quotes]
Quote from: Sjomp on May 04, 2014, 18:54
It doesn't matter how much people are online it's about how much fun you have.
Quote from: braneNext time don't use any porn site to upload pictures. Imgur or Imageshack would be fine. Its not nice to see cocks around while checking the image you came for.
Quote from: TheSandmanBan looks fair. its pathetic when people attack females just because they play an online game, wow.
Quote from: TheSandmanRap is like scissors, it always loses to rock
Quote from: HoboProvoking doesn't brake rules, but it does break them.

Remember to brake for moose so you don't break your car.
[/hide]
[hide=Konali's motto]
Quote from: Konali on January 12, 2014, 16:41I only had one rule in my head that i used in every situation: its a game, lets keep it that way.

nyolc8

The problem is that the game simply can't handle coronas properly if I just draw them for a few frame.  ::)

edit: I have an idea how to make it different way (draw coronas all the time just dynamically change their alpha - this is similar how the stock emergency light works in the game) but for that I need to rewrite the half of the code :| And I'm not sure if this would even fix the flickering or not.

nyolc8

you know it's too much when gtasa shows you this:

:D

edit: good news, I got it working by changing the alpha value, I adapted the strobe and main lights to this new method and they doesn't interfere with each other like in all released versions :like: Also now the blinking is time based and not frame based (which should prevent /or less noticable/ the blinkingspeed changing based on actual framerate)

edit2: more good news, adopted advisor full blinking function for test, and no flickering at all :like: also the script will be (I hope) smaller and faster :)

nyolc8

So:

- all lights adopted to new mechanism > no flickering at all when multiple lights enabled! Lights blinking without any strange "double-blinking" like before.

- script size is almost half as before lol (was ~22000 byte, now ~13000)

- NEW random mode for advisor: you just put it into that random mode (advisor status number turns red on screen after mode "6", also number shows what is the actual mode in random mode too) and it changes advisor lights mode in every 4 seconds (between 1 and 4 modes), still only one key (default - K) for it, so you disable it with pressing K again.

Maybe I'll make the 4 second configurable in .ini :) edit: done, also random mode feature can be turned off completely in .ini

So, update will come soon :P

nyolc8

Video from the coming new (0.9.3) version:



(sorry for mobile record)

nyolc8

more new thing done: 9 mode for advisor (instead of 6), two new blinking, and a "center-fill" (similar to the side fills but it starts from center) mode. Random mode will choose from 1-7 modes (I exclude left and right fill modes from this).

I have to recreate the numbers for onscreen status, and after that I'll release 0.9.3.

Marccc

I just installed CLEO4.
Replaced the files: FileSystemOperations.cleo, IniFiles.cleo and newOpcodes.cleo from the download cleo_extra.
Added plugin.dll into my SA folder.
Added EL and emergency.cs into the cleo folder.


When i start now SAMP i get error:
Error loading plugin cleo/newOpcodes.cleo
and some seconds later i get an error:
I can't determine your GTA version.
SA-MP only supports GTA:SA v1.0 USA/EU


Whats the problem?

LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN
BURGLARIES
ARMORED VANS STOLEN
MISSIONS FAILED
OVERLOADED
FINES PAID
TOTAL SPENT ON FUEL
INTEREST EARNED
DISTANCE TRAVELLED
TIME IN JAIL
LAST MISSION
Generated by ASP.NET Core on Linux using the Convoy Trucking API. Updates every 5 minutes. See the original SVG image.

~!!!~ Watch my Police cars collection in the link below ~!!!~

[hide=link]http://imgur.com/a/gaJTT[/hide]

nyolc8

Are you sure you have newOpcodes.cleo in CLEO folder? I got that error once when I accidentally deleted that file.

Marccc

Quote from: nyolc8 on February 18, 2015, 19:56
Are you sure you have newOpcodes.cleo in CLEO folder? I got that error once when I accidentally deleted that file.


Yes im sure, i have tried with the one that get installed when you install CLEO and i tried the one from cleo_extra download that you posted here.

LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN
BURGLARIES
ARMORED VANS STOLEN
MISSIONS FAILED
OVERLOADED
FINES PAID
TOTAL SPENT ON FUEL
INTEREST EARNED
DISTANCE TRAVELLED
TIME IN JAIL
LAST MISSION
Generated by ASP.NET Core on Linux using the Convoy Trucking API. Updates every 5 minutes. See the original SVG image.

~!!!~ Watch my Police cars collection in the link below ~!!!~

[hide=link]http://imgur.com/a/gaJTT[/hide]

nyolc8

New version 0.9.3
- new method for blinking the lights, no more flickering lights, more stable blinking
- added 3 new advisor mode (9 total)
- changed advisor to 8 lights (instead of 5 lights)
- added new random mode for advisor light (configurable in .ini file)
- added enforcer, hpv1000, firetruckLS (also updated all vehicle config for new 8 light advisor)

DOWNLOAD

EDIT: just realized that I forgot to make the fix for opcodes and crashes (/rm, exploding vehicle, etc...) for new blinkling method... >< so 0.9.4 coming soon...