Код:
if (strcmp("/car engine",cmdtext,true,11) == 0)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 0)
{
SetVehicleParamsEx(GetPlayerVehicleID(playerid),1,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,COLOR_WHITE,"you have switched your engine on");
}
if(engine == 1)
{
SetVehicleParamsEx(GetPlayerVehicleID(playerid),0,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,COLOR_WHITE,"you have switched your engine off");
}
}