An admin chat? ґ+REPP
#5

pawn Код:
CMD:achat(playerid, params[])
{
    new p2[128], Pna[32];
    if(PlayerData [playerid] [ALevel] >= 1)
{
    if( isnull (params)) return SendClientMessage(playerid, COLOR_RED, "/ac [msg]");
    GetPlayerName(playerid, Pna, 32);
        for(new i = 0; i<MAX_PLAYERS; i++)
        {
            if (IsPlayerConnected(i))
            {
                if(PlayerData[i] [ALevel] >= 1) // change ALevel to the one u store ur data
                {
                    format(p2, 128, "Admin %s (%d): %s", Pna, playerid, params);
                    SendClientMessage(i , COLOR_KHAKI, p2);  // change color_khaki to the color u want.
                }
            }
        }
    }
    else
   {
        return 0;
    }
    return 1;
}
Here is my code but u need to store admin level. it doesn't have msg showing he isnt an admin, etc. Add it

Quote:
Originally Posted by Loot
Посмотреть сообщение
pawn Код:
if(sscanf(params, "s[124]", text)) return SendClientMessage(playerid, -1, "/a [text]");
this kind of cmds doesn't need sscanf
Reply


Messages In This Thread
An admin chat? ґ+REPP - by Lynet - 12.11.2013, 13:42
Re: An admin chat? ґ+REPP - by dominik523 - 12.11.2013, 13:51
Re: An admin chat? ґ+REPP - by Loot - 12.11.2013, 13:51
Re: An admin chat? ґ+REPP - by Lynet - 12.11.2013, 14:02
Re: An admin chat? ґ+REPP - by newbie scripter - 12.11.2013, 14:11
Re: An admin chat? ґ+REPP - by Loot - 12.11.2013, 14:16
AW: An admin chat? ґ+REPP - by Skimmer - 12.11.2013, 14:18
Re: An admin chat? ґ+REPP - by iFiras - 12.11.2013, 14:28
Re: An admin chat? ґ+REPP - by Lynet - 12.11.2013, 14:32
Re: An admin chat? ґ+REPP - by Ghazal - 12.11.2013, 14:33

Forum Jump:


Users browsing this thread: 3 Guest(s)