22.12.2013, 12:04
Quote:
|
I know how to use vehicle control system, but how do i turn the lights on and off whenever it is attached to the truck? I already made /lightson and /lightsoff commands. It is only working for trucks not trailer.
|

it appears that the binary code to lightup the trailer is 0001, which equals 1
so you just have to set the lights to 1
example:
PHP код:
new op[7],tr = GetVehicleTrailer(GetPlayerVehicleID(playerid));
GetVehicleParamsEx(tr,op[0],op[1],op[2],op[3],op[4],op[5],op[6]);
SetVehicleParamsEx(tr,op[0],1,op[2],op[3],op[4],op[5],op[6]);//the 3th argument is the one for the lights


