SA-MP Forums Archive
Engine & Lights with 2 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Engine & Lights with 2 (/showthread.php?tid=493033)



Engine & Lights with 2 - Rudiz - 06.02.2014

Hello.

Maybe some recommendations how to make it? I find this but it start only engine. I tried to create a script which start engine & lights but it won't work.

Be nice if someone show how to make lights with 2.. I'll be grateful.


Re: Engine & Lights with 2 - Riddick94 - 06.02.2014

Let's use GetVehicleParamsEx for that. All vehicle params when they're spawned are values of: -1. So, basically you'll have to check vehicle state (store values) by above function and then do if statement to your engine if it's lower than '0'. If so, put the engine on (SetVehicleParamsEx) in different case (else) set vehicle params back to '0' (false). Check it at SA-MP wiki.


Re: Engine & Lights with 2 - Rudiz - 06.02.2014

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Let's use GetVehicleParamsEx for that. All vehicle params when they're spawned are values of: -1. So, basically you'll have to check vehicle state (store values) by above function and then do if statement to your engine if it's lower than '0'. If so, put the engine on (SetVehicleParamsEx) in different case (else) set vehicle params back to '0' (false). Check it at SA-MP wiki.
Alright.. I'll check SA-MP wiki. About engine - I works perfectly.. but lights just do not want start.


Re: Engine & Lights with 2 - MrTinder - 06.02.2014

Add "ManualVehicleEngineAndLights();" in "OnGameModeInit"


Re: Engine & Lights with 2 - Rudiz - 06.02.2014

Quote:
Originally Posted by MrTinder
Посмотреть сообщение
Add "ManualVehicleEngineAndLights();" in "OnGameModeInit"
Yeah.. I was completely forgotten. Thank you.