SA-MP Forums Archive
Headlights problem - 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: Headlights problem (/showthread.php?tid=470475)



Headlights problem - gephaest - 18.10.2013

Hello! I've trouble with vehicle headlights. When I sit in vehicle lights turn off, but I'm out of the car he turn on.
Gamemode inclued YSI, SetVehicleParamsEx not used.

P.S.: sry for my bad English ;(


Re: Headlights problem - Smally - 18.10.2013

Could you provide us with some code? Use [ pawn ] tags


Re: Headlights problem - gephaest - 19.10.2013

Of course:
pawn Код:
new veh = GetPlayerVehicleID(playerid);
....

else if(!strcmp(option, "lights", true)) {
  GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  if(lights)
    SetVehicleParamsEx(veh, engine, false, alarm, doors, bonnet, boot, objective);
  else
    SetVehicleParamsEx(veh, engine, true, alarm, doors, bonnet, boot, objective);
  return true;
}



Re: Headlights problem - HardRock - 19.10.2013

Have you.....

PHP код:
public OnGameModeInit()
{
    
ManualVehicleEngineAndLights();




Re: Headlights problem - gephaest - 19.10.2013

Quote:
Originally Posted by HardRock
Посмотреть сообщение
Have you.....

PHP код:
public OnGameModeInit()
{
    
ManualVehicleEngineAndLights();

Thanks! It's work!