[Ajuda] Travar comando
#3

pawn Код:
if (strcmp("/motor", cmdtext, true, 10) == 0)
    {
        new statew = GetPlayerState(playerid);
        new mot, lu, alar, por, cap, porma, ob;
        new carro = GetPlayerVehicleID(playerid);
        if(carro != INVALID_VEHICLE_ID)
        {
            if(motor[carro] == 0 && statew == PLAYER_STATE_DRIVER)
            {
                GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
                SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
                motor[carro] = 1;
                SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!");
                return 1;
            }
        }
    }
    if (strcmp("/motor", cmdtext, true, 10) == 0)
    {
        new statew = GetPlayerState(playerid);
        new mot, lu, alar, por, cap, porma, ob;
        new carro = GetPlayerVehicleID(playerid);
        if(carro != INVALID_VEHICLE_ID)
        {
            if(motor[carro] == 1 && statew == PLAYER_STATE_DRIVER)
            {

                GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
                SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
                motor[carro] = 0;
                SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado!");
                return 1;
            }
        }
    }
Reply


Messages In This Thread
Travar comando - by willian Franco - 10.12.2014, 13:31
Re: TRAVAR COMANDO - by MultiKill - 10.12.2014, 13:41
Re: TRAVAR COMANDO - by Adejair_Junior - 10.12.2014, 13:42
Re: TRAVAR COMANDO - by JonathanFeitosa - 10.12.2014, 13:43
Respuesta: TRAVAR COMANDO - by willian Franco - 10.12.2014, 13:52

Forum Jump:


Users browsing this thread: 1 Guest(s)