[Ajuda] Chat de Admin
#4

pawn Код:
dcmd_a(playerid, params[]) {
    if (!strlen(params))
        return SendClientMessage(playerid, -1, "Use: /a [Texto]");
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid,0xFFFFFFAA,"{FF0000}| FAIL | {FFFFFF}Desculpe, apenas os administradores podem usar esse comando!");
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof pname);
    format(ChatADM, sizeof ChatADM,"{FFFF00}| Administrador | {FFFFFF}%s diz:%s",pname, params);
    //Faltou a funзгo que manda a mensagem para todos os administradores!
    /*Ex
    SendAdminMessage(COLORADM, ChatADM);
    */

    return true;
}
Como o comando й para administradores RCON.
pawn Код:
dcmd_a(playerid, params[]) {
    if (!strlen(params))
        return SendClientMessage(playerid, -1, "Use: /a [Texto]");
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid,0xFFFFFFAA,"{FF0000}| FAIL | {FFFFFF}Desculpe, apenas os administradores podem usar esse comando!");
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof pname);
    format(ChatADM, sizeof ChatADM,"{FFFF00}| Administrador | {FFFFFF}%s diz:%s",pname, params);
    static i;
    for(i = GetMaxPlayers() - 1; i != -1; --i){
        if (IsPlayerConnected(i) && IsPlayerAdmin(i))
            SendClientMessage(i, -1, ChatADM);
     }
    return true;
}
Reply


Messages In This Thread
Chat de Admin - by clerISoN - 23.05.2013, 01:38
Re: Chat de Admin - by .FuneraL. - 23.05.2013, 01:43
Re: Chat de Admin - by Kmatsu - 23.05.2013, 01:44
Re: Chat de Admin - by Gii - 23.05.2013, 01:44
Re: Chat de Admin - by clerISoN - 23.05.2013, 01:58
Re: Chat de Admin - by .FuneraL. - 23.05.2013, 02:00
Re: Chat de Admin - by focaximubh - 23.05.2013, 02:00
Re: Chat de Admin - by clerISoN - 23.05.2013, 02:10
Re: Chat de Admin - by clerISoN - 23.05.2013, 16:25

Forum Jump:


Users browsing this thread: 1 Guest(s)