27.06.2012, 13:14
pawn Код:
if(strcmp(cmd, "/engine", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return scm(playerid,c_r,"( ! ) You're not in any vehicle to use /engine");
if(GetPlayerVehicleSeat(playerid) !=0) return scm(playerid,c_r,"( ! ) You're not driver of this vehicle for use /engine !");
new vehicle = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine != 0)
{
SetVehicleParamsEx(vehicle,false,lights,alarm,doors,bonnet,boot,objective);
scm(playerid,COLOR_GREEN,"( ! ) Engine is off !");
return 1;
}
else if(engine != 1)
{
SetVehicleParamsEx(vehicle,true,lights,alarm,doors,bonnet,boot,objective);
scm(playerid,COLOR_GREEN,"( ! ) Engine is on !");
}
return 1;
}