SA-MP Forums Archive
Can't check if the car lights are on/off - 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: Can't check if the car lights are on/off (/showthread.php?tid=394845)



Can't check if the car lights are on/off - Moron - 24.11.2012

Код:
if(GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,0,alarm,doors,bonnet,boot,objective))
{
SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,1,alarm,doors,bonnet,boot,objective);
return 1;
}
error 035: argument type mismatch (argument 3)


Re: Can't check if the car lights are on/off - BrandyPenguin - 24.11.2012

Correct way:
Код:
GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective)
if(lights != 1)
{
SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,true,alarm,doors,bonnet,boot,objective);
return 1;
}



Re: Can't check if the car lights are on/off - Moron - 24.11.2012

It works.