08.10.2012, 02:43
Why don't you try to improve your codes by removing the "engineOn" variable? This is a start, edit so it fits your script. And like I said in an other topic, try to learn by yourself, stop taking the codes of other GM or FS. The codes are always easier to understand when you made them yourself. Plus, if you learn, you'll reduce posting in scripting help.
Edit: I forgot things in the codes.
pawn Код:
if(!strcmp(cmd, "/engine", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerConnected(playerid))
{
new vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 0)
{
SetVehicleParamsEx(vid,1,lights,alarm,doors,bonnet,boot,objective);
return 1;
}
else
{
SetVehicleParamsEx(vid,0,lights,alarm,doors,bonnet,boot,objective);
return 1;
}
}
}
return 1;
}