/engine problem
#2

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;
    }
use this, its my cmd and its works good, the cmd switch on and off
Reply


Messages In This Thread
/engine problem - by kidor - 27.06.2012, 13:12
Re: /engine problem - by mineralo - 27.06.2012, 13:14
Re: /engine problem - by kidor - 27.06.2012, 13:39
Re: /engine problem - by Littlehelper - 27.06.2012, 13:44
Re: /engine problem - by kidor - 27.06.2012, 13:56
Re: /engine problem - by Littlehelper - 27.06.2012, 13:59

Forum Jump:


Users browsing this thread: 2 Guest(s)