how to make in key a cmd?
#1

well, a lots players saying me to make engine and light in key, I made them in cmd, any one know how to make in key?
pawn Код:
if(strcmp(cmd, "/engine", true) == 0)
    {
    if(!IsPlayerInAnyVehicle(playerid)) return scm(playerid,c_r,"( ! ) You're not in any vehicle to 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 && Gas[vehicle] == 0) return scm(playerid,c_r,"( ! ) This doesn't have fuel for switch on the engine !");
    else if(engine != 1 && Gas[vehicle] != 0)
    {
    SetVehicleParamsEx(vehicle,true,lights,alarm,doors,bonnet,boot,objective);
    scm(playerid,COLOR_GREEN,"( ! ) Engine is on !");
    }
    return 1;
    }
Reply


Messages In This Thread
how to make in key a cmd? - by mineralo - 06.02.2012, 17:12
Re: how to make in key a cmd? - by mineralo - 06.02.2012, 17:47
Re: how to make in key a cmd? - by niels44 - 06.02.2012, 18:14

Forum Jump:


Users browsing this thread: 1 Guest(s)