SA-MP Forums Archive
Vehicle Light - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle Light (/showthread.php?tid=262142)



Vehicle Light - Shidony - 16.06.2011

Hi everybody,

Today i have a little problem but I don't know how to fix it, but i think it's easy ^^.

So i explain, when I put vehicle lights ON, I have only one light ON and the other is OFF.

Screen:



Can you help me ?


Re: Vehicle Light - Vince - 16.06.2011

You have this function?
pawn Код:
// props to whoever wrote this function
stock encode_lights(light1, light2, light3, light4) {
    return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);
}
Use it in your SetVehicleParamsEx funtion and set all lights to 1.


Re : Vehicle Light - Shidony - 16.06.2011

I do that ?
pawn Код:
SetVehicleParamEx(vehid,engine,lights,doors,bonnet,boot,objective);
encode_lights(1,1,1,1);
If no, can you show me an example ?


Re : Vehicle Light - Shidony - 17.06.2011

up ! i really need this