[Ajuda] ChatGlobal
#7

pawn Код:
public OnPlayerText(playerid, text[])
{
    new string[129];
    if(BloquearChat[playerid] == 1) return SendClientMessage(playerid, red, "[x] O chat estб desativado e vocк nгo poderб digitar.");
    if(mute[playerid] == 1) return SendClientMessage(playerid, red, "[x] Voce estб calado e nгo pode falar no chat.");
    if(strlen(text) >= 70) return SendClientMessage(playerid,red,"[x] Seu texto nгo foi enviado pois estб muito grande.");

    if(!EstaAFK[playerid]){
        TFora[playerid] = SetTimerEx("Fora", 60000, 1, "i", playerid);
        EstaAFK[playerid] = 1;
        return 0;
    }
    else
    {
        KillTimer(TFora[playerid]);
        TFora[playerid] = SetTimerEx("Fora", 60000, 1, "i", playerid);
        EstaAFK[playerid] = 1;
        return 0;
    }
    if(PInfo[playerid][Level] >= 1){
        format(string, sizeof(string), "[ %d ] [ ADM ] %s {FFFFFF}%s", playerid, GetNameEx(playerid), text);
        SendClientMessageToAll(GetPlayerColor(playerid), string);
        return 0;
    }
    else
    {
        format(string, sizeof(string), "• [ %d ] %s {FFFFFF}%s", playerid, GetNameEx(playerid), text);
        SendClientMessageToAll(GetPlayerColor(playerid), string);
    }
    return 0;
}

//Fora da callback
GetNameEx(idx)
{
    new Sk[MAX_PLAYER_NAME];
    GetPlayerName(idx, Sk, sizeof(Sk));
    return Sk;
}
Nгo testado!
Reply


Messages In This Thread
ChatGlobal - by eNtinityGaming - 19.02.2014, 03:26
Re: ChatGlobal - by eNtinityGaming - 19.02.2014, 03:47
Re: ChatGlobal - by eNtinityGaming - 19.02.2014, 11:38
Re: ChatGlobal - by Wanderson_SAMP - 19.02.2014, 11:53
Re: ChatGlobal - by eNtinityGaming - 19.02.2014, 11:57
Re: ChatGlobal - by Wanderson_SAMP - 19.02.2014, 12:16
Re: ChatGlobal - by Sky™ - 19.02.2014, 12:21
Re: ChatGlobal - by eNtinityGaming - 19.02.2014, 13:05
Re: ChatGlobal - by Sky™ - 19.02.2014, 13:23
Re: ChatGlobal - by eNtinityGaming - 19.02.2014, 13:37

Forum Jump:


Users browsing this thread: 6 Guest(s)