[Ajuda] Comando automatico em hora
#5

Quote:
Originally Posted by Diksplay
Посмотреть сообщение
FINAL DO GM:
pawn Код:
stock ResetarCarros(playerid)
{
    new string[128],
    nome[MAX_PLAYERS];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "[INFO]: O Adminstrador %s Respawnou todos os veiculos", name);
    SendClientMessageToAll(0xFFFFFFFF, string);
    new inVeh;
    for( new i = 0; i < MAX_VEHICLES; i++ )
    {
        inVeh = false;
        for( new j = 0; j < SLOTS; j++ )
        {
            if(IsPlayerInVehicle( j, i ))
            {
                inVeh = true;
                break;
            }
        }
        if(inVeh == false)
        {
            SetVehicleToRespawn(i);
        }
    }
}
Comando:
pawn Код:
CMD:rc(playerid, params[])
{
ResetarCarros(playerid);
}
Em Horario:
pawn Код:
//OnPlayerUptade, Eu Acho que poem ai.
Gettime(Hora, Minuto);
if(Hora == 19 && Minuto == 30) {
ResetarCarros(playerid);
}
o comando de /rc й
pawn Код:
if(strcmp(cmd, "/respawncarros", true) == 0 || strcmp(cmd, "/rc", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] < 2)
            {
                SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando !");
                return true;
            }
            new bool:unWanted[CAR_AMOUNT];
            for(new player=0; player<MAX_PLAYERS; player++)
            {
                if(IsPlayerConnected(player) && IsPlayerInAnyVehicle(player)) { unWanted[GetPlayerVehicleID(player)]=true; }
            }
            for(new i; i != CAR_AMOUNT; i++)
            {
                if(!unWanted[i])    SetVehicleToRespawn(i);
            }
            GetPlayerName(playerid, playername, sizeof(playername));
            format(string, sizeof(string), "AdmCmd: Respawn dado com sucesso por %s",playername);
            ABroadCast(COLOR_LIGHTRED,string,1);
            format(string, sizeof(string), "Admin %s deu respawn nos carros",playername);
            comandosadminlog(string);
        }
        return true;
    }
devo transformar o comando na stock?
Reply


Messages In This Thread
Comando automatico em hora - by bombomloko - 23.11.2013, 16:23
Re: Comando automatico em hora - by CharlieBrown - 23.11.2013, 16:26
Re: Comando automatico em hora - by bombomloko - 23.11.2013, 16:30
Re: Comando automatico em hora - by LucaAllexandre - 23.11.2013, 17:11
Re: Comando automatico em hora - by bombomloko - 23.11.2013, 17:13
Re: Comando automatico em hora - by LucaAllexandre - 23.11.2013, 17:19

Forum Jump:


Users browsing this thread: 1 Guest(s)