[GTA:SA] Improved Vehicle Lights +ELM!

Started by R3public[PL], December 14, 2014, 13:01

BeastyBill88

#75
Quote from: nyolc8 on December 27, 2014, 18:55
Quote from: Marccc on December 27, 2014, 18:46
It look good, now my question is how we have to use it because we also have the original light flashing and sirene from the game, is that one disabled or start it together with the main emergency light?
For now it works totally seperated, it has nothing to do with the stock siren. I already asked on gtaforums if the stock light effect can be blocked somehow. If I can block the stock emergency lights while keeping the siren on, then the main emergency light will be the stock one (the one which can be enabled with the horn key). Now I'm working to make the amber lights to have 4 modes  ;)

Holy shit Nyolc8 this is amazing! It looks so much better then the ELM system. So it can be added to any vehicle yes? Standard, modded or other? :D is it possible to make different patterns for the strobe and main lights, like you have done with the traffic advisor?

Also I know that you can "disable" the corona, but it will disable it for everything else that uses the texture i.e lap posts, vehicle headlights etc. It is somewhere in the particle.txd file I think.

nyolc8

Yes, you can add emergency light for any vehicle, doesn't matter if it's modded or not. For now, only advisor have multiple patterns, but I may add more to others too.

I know I can remove the corona but as you said, it's used for every light, also it's not just the corona, default emergency light have light effect too(the red/blue colorization of the near cars,etc), and that should be removed too.

Marccc

So if i chase someone and use my sirene to aware other players of a upcomming police car i will see the original lightbar at my car and your mod when i start it?


And an other thing, in gta 4 ELS you have a key to change the mode and a other key to start the light of that mode. What i understand from your video is if i want to use the traffic advisor to the left side i have to press an amount of times to get the mode i want instead of change the mode and keep it in that mode with one key and start and stop it with a other key?

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

#78
You can enable the stock siren/emergency light and you can enable the extra emergency lights with other keys. Only the stock siren will be visible for others in SAMP.

You need to press the advisor light key multiple times. I'll may change this to what you said.

Now I want to remove the stock emergency lights while keeping the siren sound on. But I have no idea how...

Benny

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
DISTANCE TRAVELLED

Marccc

Quote from: nyolc8 on December 31, 2014, 11:35
You can enable the stock siren/emergency light and you can enable the extra emergency lights with other keys. Only the stock siren will be visible for others in SAMP.

You need to press the advisor light key multiple times. I'll may change this to what you said.

Now I want to remove the stock emergency lights while keeping the siren sound on. But I have no idea how...


Maybe you can use this info
http://gtapolicemods.com/showthread.php?12085-TUT-Video-GTA-iV-police-lights-to-GTA-SA


Edit: oh ye as said above by beasty it give problems with other lights...

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

Thanks, but as you can see on the video, the car gets colored by invisible blue/red light. And I want to remove that too. There must be a memory address somewhere which handles this. And I would need to clear that out. But have no idea how to figure out that memory address.

BeastyBill88

Maybe its in the main.script file? I know there is alot of coding in there and it would take a while, but thats the only place I can think of unless its part of the exe.

Also I was wondering if you do manage to disable the default lighting effects will your elm show up on AI vehicles if they are set up in the ini file to have lights? I mean if that is even possible. Because it would look amazing with the AI in SP having your new elm system.

nyolc8

Quote from: BeastyBill88 on December 31, 2014, 15:03
Maybe its in the main.script file? I know there is alot of coding in there and it would take a while, but thats the only place I can think of unless its part of the exe.

Also I was wondering if you do manage to disable the default lighting effects will your elm show up on AI vehicles if they are set up in the ini file to have lights? I mean if that is even possible. Because it would look amazing with the AI in SP having your new elm system.
Well, for now these lights can be only turned on for one vehicle at a time, so it works liek this now:
- turn on EL in police car #1
- get out of the car go to another one, call this police car 2#
- turn on EL in police car #2
- EL turns off for police car #1

I made some tests and could do it for multiple vehicles at the same time, but I have no idea how to remain controlling them if I do it like that. Maybe in the future I rework this somehow... But now I simply don't know how to do that.

BeastyBill88

#84
Quote from: nyolc8 on December 31, 2014, 15:20
Quote from: BeastyBill88 on December 31, 2014, 15:03
Maybe its in the main.script file? I know there is alot of coding in there and it would take a while, but thats the only place I can think of unless its part of the exe.

Also I was wondering if you do manage to disable the default lighting effects will your elm show up on AI vehicles if they are set up in the ini file to have lights? I mean if that is even possible. Because it would look amazing with the AI in SP having your new elm system.
Well, for now these lights can be only turned on for one vehicle at a time, so it works liek this now:
- turn on EL in police car #1
- get out of the car go to another one, call this police car 2#
- turn on EL in police car #2
- EL turns off for police car #1

I made some tests and could do it for multiple vehicles at the same time, but I have no idea how to remain controlling them if I do it like that. Maybe in the future I rework this somehow... But now I simply don't know how to do that.

Well it is early days, I have faith in you lol. It would be awesome it did work on multiple vehicles though. If I knew how to script I could help work it out, but I have no idea what to do. The last thing I scripted was to make the AI move over when your riding the police bike with its siren turned on.

EDIT: I was looking at the ImVehFt police vehicles in one of the other topics. You might be able to use some of the coding from that mod to have the lights working on multiple vehicles as the same time. Just a thought, its worth having a look.

nyolc8

I can't decompile asi-s. So I can't look into the code. Btw the key for multiple vehicles is to start a new thread for each vehicle. I made this, lights worked simultanously for more vehicles in a test. BUT I have no idea how to know which car to control... so I mean how to know which car runs which thread... :D I need to figure this out.

BeastyBill88

Quote from: nyolc8 on December 31, 2014, 18:41
I can't decompile asi-s. So I can't look into the code. Btw the key for multiple vehicles is to start a new thread for each vehicle. I made this, lights worked simultanously for more vehicles in a test. BUT I have no idea how to know which car to control... so I mean how to know which car runs which thread... :D I need to figure this out.

See I told you I had faith in you to work it out lol. That one I have no idea to be honest, I know that the ELM and/or SAPD:FR mod has a separate script for the AI police vehicles to have Emergency lights. But its going to be a bit more difficult to code for your mod because it doesn't run off the headlights.

Marccc

Is it possible to make that if an player have this mod and use it that an other player who have also this mod can see the lights flashing of the other player?

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

Quote from: BeastyBill88 on December 31, 2014, 18:55
Quote from: nyolc8 on December 31, 2014, 18:41
I can't decompile asi-s. So I can't look into the code. Btw the key for multiple vehicles is to start a new thread for each vehicle. I made this, lights worked simultanously for more vehicles in a test. BUT I have no idea how to know which car to control... so I mean how to know which car runs which thread... :D I need to figure this out.

See I told you I had faith in you to work it out lol. That one I have no idea to be honest, I know that the ELM and/or SAPD:FR mod has a separate script for the AI police vehicles to have Emergency lights. But its going to be a bit more difficult to code for your mod because it doesn't run off the headlights.
Well... I read your answer and got an idea... a thread which scans near police cars and check if siren enabled... if enabled then attaching a new thread for every car and boom flashing lights for AI police cars. I'll check this out later.

Quote from: Marccc on December 31, 2014, 18:56
Is it possible to make that if an player have this mod and use it that an other player who have also this mod can see the lights flashing of the other player?
Not really, there is no way to sync additional things through samp. But if I make the AI police car thing, then if someone enables the stock siren near you on samp, you will see the new flash lights on his car.

BeastyBill88

Quote from: nyolc8 on December 31, 2014, 19:04
Quote from: BeastyBill88 on December 31, 2014, 18:55
Quote from: nyolc8 on December 31, 2014, 18:41
I can't decompile asi-s. So I can't look into the code. Btw the key for multiple vehicles is to start a new thread for each vehicle. I made this, lights worked simultanously for more vehicles in a test. BUT I have no idea how to know which car to control... so I mean how to know which car runs which thread... :D I need to figure this out.

See I told you I had faith in you to work it out lol. That one I have no idea to be honest, I know that the ELM and/or SAPD:FR mod has a separate script for the AI police vehicles to have Emergency lights. But its going to be a bit more difficult to code for your mod because it doesn't run off the headlights.
Well... I read your answer and got an idea... a thread which scans near police cars and check if siren enabled... if enabled then attaching a new thread for every car and boom flashing lights for AI police cars. I'll check this out later.

I like that idea, I reckon that could work, you would only have to set up 1 flash pattern for the AI to use, as SAPD:FR uses a simple wig-wag flash for AI. which like you said starts a new thread for each vehicle with its siren on to enable ELM... If you can code it similar to that hey presto flashing lights for all lol :D