car lights not working correctly - 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: car lights not working correctly (
/showthread.php?tid=530029)
car lights not working correctly -
finelaq - 05.08.2014
hi, my problem is today that when i type command /lights then in day time the car light not turn on, but when it's night time and i type /lights then it works perfect, please help me.
pawn Код:
CMD:lights(playerid, params[])
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, V_PUNANE, "[VIGA]: Sa pead olema sхidukis ,et kasutada seda kдsku!");
new vehicleid = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, engine, (lights) ? (0) : (1), alarm, doors, bonnet, boot, objective);
return 1;
}
Re: car lights not working correctly -
McDzuna97 - 05.08.2014
This should work:
pawn Код:
SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
Re: car lights not working correctly -
Threshold - 05.08.2014
https://sampwiki.blast.hk/wiki/ManualVehicleEngineAndLights