Engin cmd makes my pawno stopped working - 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: Engin cmd makes my pawno stopped working (
/showthread.php?tid=382599)
Engin cmd makes my pawno stopped working -
Jassey - 04.10.2012
I want to make cmd /engin to turn on/off the engine of vehicles, but i found a problem while i compile the script. The pawno was stopped cause that.
Код:
CMD:engine(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"Command tersebut tidak dapat digunakan ke kendaraan ini.");
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_ON)
{
SetVehicleEngine(vehicleid, playerid);
}
else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
{
SendClientMessageEx(playerid, COLOR_WHITE, "Sedang menyalakan mesin, harap tunggu...");
SetTimerEx("SetVehicleEngine", 1000, 0, "dd", vehicleid, playerid);
}
}
return 1;
}
Re: Engin cmd makes my pawno stopped working -
gtakillerIV - 04.10.2012
Works fine here.
Re: Engin cmd makes my pawno stopped working -
Scrillex - 04.10.2012
else if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
Re: Engin cmd makes my pawno stopped working -
mamorunl - 04.10.2012
Normally, this would be caused by a missing closing bracket or the like. However, there doesn't seem to be anything wrong with this piece of code provided.
Re: Engin cmd makes my pawno stopped working -
Jassey - 04.10.2012
Quote:
Originally Posted by Scrillex
else if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
|
Wow man thanks a lot man, it's solved. Can you help me? i have one problem with TextDraw
Re: Engin cmd makes my pawno stopped working -
Scrillex - 04.10.2012
Whats needed

Just ask