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



Engine problem - Tanush123 - 13.11.2011

How come when player enters a vehicle it shows engine are off but the engines are on when i start driving. after when i did /engine it said you have started your engines so i get out my car and enter again and it says your engine are off

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new vid = GetPlayerVehicleID(playerid);
    if(vEngine[vid] == 0)
    {
        SendClientMessage(playerid,orange,"That vehicle engine is off, use /engine to turn it on");
        vEngine[vid] = 0;
        SetVehicleParamsEx(vid, 0, lights, false, doors, bonnet, boot, objective);
    }
    return 1;
}



Re: Engine problem - Pharrel - 13.11.2011

pawn Код:
//ongamemodeinit
ManualVehicleEngineAndLights();
Then you dont need a variable to store the engine status.


Re: Engine problem - Tanush123 - 13.11.2011

Do i only add that or add that and remove the lines with variables like vEngine etc