16.02.2012, 23:20
Try this, not tested though.
pawn Код:
if(!strcmp(cmdtext, "/engine", true)) {
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You are not in any vehicle.")
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "You need to be the driver.");
new veh = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine) SetVehicleParamsEx(veh, 0, lights, alarm, doors, bonnet, boot, objective);
else SetVehicleParamsEx(veh, 1, lights, alarm, doors, bonnet, boot, objective);
return 1;
}