PDA

View Full Version : Lights


lsreskjn
14/02/2014, 09:21 PM
new engine, lights, alarm, doors, bonnet, boot, objective;

if(newkeys & KEY_YES) // Numpad 4
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective); // ONLY the engine param was changed (to 1)
return 1;
}

It's not working, any ideas? It;s suppose to turn the lights ON

Konstantinos
14/02/2014, 09:25 PM
http://wiki.sa-mp.com/wiki/ManualVehicleEngineAndLights

If the above function is not used, then you cannot turn the lights on/off by the script.

lsreskjn
14/02/2014, 09:42 PM
thanks, now its working but ai cant start the vehicle