Admin chat problem
#1

Hi,i've this admin chat cmd:

pawn Код:
dcmd_a(playerid, params[])
{
    new ChatMessage[256],name[24];
    if(sscanf(params, "s", ChatMessage)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /a [message]");

    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    new string[256];
    format(string,sizeof(string),"AdmChat %s [%d]: %s",name,playerid,ChatMessage);
    IRC_GroupSay(gGroupID, IRC_ADMINCHANNEL, string);

    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][AdminLevel] >= 2)
        {
        SendClientMessage(i, COLOR_GOLD, string);
        AdminCLog(string);
        PlayerPlaySound(i, 1137, 0.0, 0.0, 0.0);
        }
    }
    return 1;
}
I have admin variables but all players can use it.Why?
Reply


Messages In This Thread
Admin chat problem - by Face9000 - 22.12.2010, 14:26
Re: Admin chat problem - by XePloiT - 22.12.2010, 14:36

Forum Jump:


Users browsing this thread: 1 Guest(s)