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

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

BeastyBill88

Quote from: Hakan on March 25, 2015, 21:22
Quote from: BeastyBill88 on March 25, 2015, 19:28
Did you also import and replace the Roadtrain txd with the Tanker txd file?

Beastybill how can i do that?

You do it the same way you replaced the Roadtrain.dff Just replace the Roadtrain.txd with Petro.txd and it should fix the textures.

nyolc8

coronas and car parts/textures(if exist in model) blinking, lightshadow/light blinking is left to do...



I won't make multiple blink patterns and such for these cars, because the script is getting too big, and I think you won't look that much while you escaping from police anyway... :D It's better than nothing.

BeastyBill88

Oh yes! That looks brilliant. Well you don't need multiple light patterns for other vehicles just a simply flash one which you have done is good enough. Looks so good :D

Vytaras


BeastyBill88

Yeah I am using 0.3.7 RC2 or what ever the newest version is.

Vytaras

Well I tried to run the game and it crashed for some reason.

Miss101

It's so hard to adjust the lights to modded vehicles D: I wish you'd make something like an ingame editor or somehing that makes it easier X__X

nyolc8

@Miss101: well, atleast you can adjust it... :P (I'll look into it if I can make something, but it would be really hard to make)

@Vytaras: What CLEO version you have? What gta_sa.exe you have?

***

I just realized I have no idea how to check for each vehicle if siren is enabled or not... So now I don't know how to make this other-cars thing...

Falco

Quote from: Vytaras on March 27, 2015, 22:58
Well I tried to run the game and it crashed for some reason.
I crashed too when the game tried to start, it was fixed by replacing the gta_sa.exe with another one.
This one fixed it for me:
https://mega.co.nz/#!sd8QmAzS!OzkiwO-hO68hJwp6cLYhFqNpw00r5beDfGjTLmGpv5U

@nyolc8
Maybe it's worth mentioning in the first post that you need another gta_sa.exe



nyolc8

It needs the "hoodlum" US 1.0 gta_sa.exe

I'll try to implement an exe checking mechanism into the script. And then it could inform people if the exe is the problem.

(The reason it works with hoodlum exe is that the memory address documentation has been made for that exe only. And I made this script based on that documentation.)

AzureSpeed

nyolc maybe implement smth into the script that first checks the vehicle id of the player playing as cop and if its an actual cop car, then the script should start itself then, but i think this way the script could make the game laggy so i dont know if its a good idea or not you have to test it out.

nyolc8

I'm testing these:
- is the car have driver?
- is the car driver is not the player
- is the car is not the car which lights controlled by U,I,O,G,J,K,L,B?
- is the car defined in vehicles.ini? (not yet implemented)
- is the car siren is on? (not really want to work, no idea why)

The process looks somehow like this:
1: is there a car nearby?
2: if yes then
3: checking things which I described above
4a: if those things true then
5a: start blinking lights
4b: if those things false then
5b: going into a "waiting state" where it waiting for another car to be checked

The problem is, if a car has those things true(4a), then a property changes to false(4b), then back to true(4a), then the script will disable lights(5b) because of the false state, but then it will still just waiting for another car and not checking the already known car, so when properties becoming true again, lights not applied again.

Somehow I need to figure out how to make a car "new" for the script in it's "waiting state" when the car properties becoming false. I could fix this problem by removing the "waiting state" and checking continously, but then the script would go crazy and would apply 563272536 lights to every car in every second :D

So somehow I need to figure out how to re-check a vehicle properties when it's already had their lights.

nyolc8

Implemented a little check mechanism which informs you if you have unsupported gta_sa.exe instead of crashing. (or atleast I hope it won't crash lol)

edit: looks like I finally was able to handle car checkings, but the "siren_on" checking opcode does not return any value and I have no idea why :/ - okay it's working :D

I think I'll need someone who can help me testing this on CT server (just need to go near me with a copcar and enable siren)
Anyone?

edit2: just realized I never used car-finding-in-range opcode correctly, so it didn't worked at all on CT server, but proper method making lights attached to each vehicle continously, so lights are brighter and brighter and brighter... ><

btw emergency.cs works with cleo 4.3, just tested

SpazzBucket.

Yea I've been meaning to say, since the last update the main lights (g) are extremely bright to the point of me not being able to see where I'm going and hurting my eyes
"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 bug I said is not present in the version which released... :P that's another issue for you then. Maybe you have a timecyc which makes them brighter. You can change the lights intensity by lowering the "alpha" values in the vehicles.ini

edit: added an option to be able to disable mainEL light casting on objects (useful if you want to use mainEL for another purpose than main emergency light)

I still have no idea how to make the light for all cars... ><

Btw all my scripts now working with cleo 4.3 for some reason... flagger script needed to modified a bit, but all others (including diesel_smoke) working with sounds and all stuff.