SA-MP Forums Archive
Vehicle control? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle control? (/showthread.php?tid=268392)



Vehicle control? - Outcast - 12.07.2011

I have a command for engine, /engine. But when I type /engine to turn on the engine for the first time, I have to type it twice, because the first time nothing happens.

pawn Код:
CMD:engine(playerid)
{
    new vehid = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine)return SetVehicleParamsEx(GetPlayerVehicleID(playerid),0,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(GetPlayerVehicleID(playerid),1,lights,alarm,doors,bonnet,boot,objective);
    return 1;
}



Re: Vehicle control? - Horrible - 12.07.2011

sorry for being annoying if u want to be easier
https://sampforum.blast.hk/showthread.php?tid=267125