[Ajuda] Nicks sendo trocados no OnPlayerText
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(Flooder[playerid] == 1)
    {
        SendClientMessage(playerid, -1, "{FF4500}| ANTI-FLOOD | Vocк estб calado.");
        return 0;
    }
    IsFlooding[playerid]++;
    if(!IsPlayerAdmin(playerid))
    {
        if(strlen(text) == strlen(szPlayerChatMsg[playerid]) && !strcmp(szPlayerChatMsg[playerid], text,  false))
        {
            SendClientMessage(playerid, -1, "{FF4500}| ANTI-FLOOD | Nгo repita a mesma mensagem");
            format(szPlayerChatMsg[playerid], 128, "%s", text);
            return 0;
        }
    }
    if(IsFlooding[playerid] >= 3)
    {
        IsFlooding[playerid] = 0;
        Flooder[playerid] = 1;
        format(String, sizeof(String), "{FF4500}| ANTI-FLOOD | O jogador %s foi calado por 45 segundos.", PlayerName(playerid));
        SendClientMessageToAll(-1, String);
        SetTimerEx("LiberarChat", 45000, false, "i", playerid);
        return 0;
    }
    else
    {
        SetTimerEx("SemFlood", 2000, false, "i", playerid);
    }

   
    GetPlayerName(playerid,nome,24);
    format(String, sizeof(String), "%s [%d]: {FFFFFF}%s", nome, playerid, text);
    SendClientMessageToAll(GetPlayerColor(playerid), String);
    return 0;
}
Reply


Messages In This Thread
Nicks sendo trocados no OnPlayerText - by Yaan.Mx - 22.07.2012, 13:43
Re: Nicks sendo trocados no OnPlayerText - by Dolby - 22.07.2012, 13:47
Re: Nicks sendo trocados no OnPlayerText - by Yaan.Mx - 22.07.2012, 14:03

Forum Jump:


Users browsing this thread: 1 Guest(s)