[AJUDA] MotorL/MotorD
#2

pawn Код:
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
new engine,lights,alarm,doors,bonnet,boot,objective;

if(strcmp(cmd, "/ligarmotor",true) == 0)
{
    new veiculoid = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid)) {
        GetVehicleParamsEx(veiculoid,engine,lights,alarm,doors,bonnet,boot,objective);
        if(engine == VEHICLE_PARAMS_ON) {
            SendClientMessage(playerid,0x800000AA," O Veiculo jб estб ligado!");
            return 1;
        }
        else {
            SetVehicleParamsEx(veiculoid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
            SendClientMessage(playerid,0x008040AA," Motor Ligado.");
        }
    }
    else {
    SendClientMessage(playerid,0x800000AA," Vocк nгo estб em um veiculo!");
    }
    return 1;
}


if(strcmp(cmd, "/desligarmotor",true) == 0)
{
    new veiculoid = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid)) {
        GetVehicleParamsEx(veiculoid,engine,lights,alarm,doors,bonnet,boot,objective);
        if(engine == VEHICLE_PARAMS_OFF) {
            SendClientMessage(playerid,0x800000AA," O Veiculo jб estб desligado!");
            return 1;
        }
        else {
            SetVehicleParamsEx(veiculoid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
            SendClientMessage(playerid,0x008040AA," Motor Desligado.");
        }
    }
    else {
    SendClientMessage(playerid,0x800000AA," Vocк nгo estб em um veiculo!");
    }
    return 1;
}
Reply


Messages In This Thread
[AJUDA] MotorL/MotorD - by Waldrey - 02.06.2012, 22:31
Re: [AJUDA] MotorL/MotorD - by leonardo1434 - 02.06.2012, 22:45
Re: [AJUDA] MotorL/MotorD - by WagnerPM - 02.06.2012, 23:09
Re: [AJUDA] MotorL/MotorD - by 'Duallity - 03.06.2012, 16:22
Re: [AJUDA] MotorL/MotorD - by leonardo1434 - 03.06.2012, 17:05
Re: [AJUDA] MotorL/MotorD - by 'Duallity - 03.06.2012, 17:15
Re: [AJUDA] MotorL/MotorD - by EduardoRFS - 03.06.2012, 20:24
Re: [AJUDA] MotorL/MotorD - by EditPawn - 03.06.2012, 20:25
Re: [AJUDA] MotorL/MotorD - by 'Duallity - 03.06.2012, 20:25
Re: [AJUDA] MotorL/MotorD - by Edu33 - 03.06.2012, 20:26

Forum Jump:


Users browsing this thread: 3 Guest(s)