[AJUDA] Anti-Flood Comandos!
#3

Topo do gamemode
pawn Код:
forward antiflood(playerid);
new antiflood[MAX_PLAYERS];
Final ou com as outras publics.
pawn Код:
public antiflood(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(antiflood[playerid] == 1)
        {
            antiflood[playerid] = 0;
        }
    }
    return true;
}
Exemplo
Topo do gamemode
pawn Код:
forward antiflood(playerid);
new antiflood[MAX_PLAYERS];
Final ou com as outras publics.
pawn Код:
public antiflood(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(antiflood[playerid] == 1)
        {
            antiflood[playerid] = 0;
        }
    }
    return true;
}
Exemplo

Topo do gamemode
pawn Код:
forward antiflood(playerid);
new antiflood[MAX_PLAYERS];
Final ou com as outras publics.
pawn Код:
public antiflood(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(antiflood[playerid] == 1)
        {
            antiflood[playerid] = 0;
        }
    }
    return true;
}
Comando com o anti-flood
pawn Код:
if(strcmp(cmd, "/oiantiflood", true) == 0)
    {
        if(antiflood[playerid] == 1)
        {
                   SendClientMessage(playerid, -1, " Aguarde 5 segundos...");
                   return 1;
        }
        else if(antiflood[playerid] == 0)
        {
                   SendClientMessage(playerid, -1, " Oi -q ");
                   antiflood[playerid] = 1;
                   SetTimerEx("antiflood", 5000, false, "i", playerid);
                   return true;
        }
        return 1;
    }
Nгo testei, mas tenta ae D:
Reply


Messages In This Thread
[AJUDA] Anti-Flood Comandos! - by Mercurio - 08.03.2012, 03:38
Re: [AJUDA] Anti-Flood Comandos! - by Guerra1 - 08.03.2012, 03:55
Respuesta: [AJUDA] Anti-Flood Comandos! - by ErickOwnZ - 08.03.2012, 04:14
Re: [AJUDA] Anti-Flood Comandos! - by Mercurio - 08.03.2012, 08:35

Forum Jump:


Users browsing this thread: 1 Guest(s)