I'm need chat admin.
#4

First add stock for admin chat..
pawn Код:
stock SendMessageToAdmins(color, const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPVarInt > Level)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
    return 1;
}

CMD:a(playerid,params[])
{
    #pragma unused params
    //new pname[MAX_PLAYER_NAME]; //Your playername stock..
    new string[128];
    if(GetPVarInt > Level)
   {
     if(!strlen(params)) return SendClientMessage(playerid,COLOR_ERROR,"Usage: /ac (Message)");

     //GetPlayerName(playerid, pname, sizeof(pname)); //Your player name stock..
     format(string,sizeof(string), "[ADMIN MESSAGE] %s(%d): %s",pname, playerid, params);
     SendMessageToAdmins(COLOR_RED, string);
   
     return 1;
     }
}
EDITED: to fit with your admin level defining
Reply


Messages In This Thread
I'm need chat admin. - by Userpwon - 14.09.2012, 19:05
Re: I'm need chat admin. - by Camacorn - 14.09.2012, 19:11
Re: I'm need chat admin. - by Drake1994 - 14.09.2012, 19:12
Re: I'm need chat admin. - by _Khaled_ - 14.09.2012, 19:17
Re: I'm need chat admin. - by Userpwon - 14.09.2012, 19:45
Re: I'm need chat admin. - by _Khaled_ - 14.09.2012, 19:52
Re: I'm need chat admin. - by Userpwon - 14.09.2012, 19:56
Re: I'm need chat admin. - by _Khaled_ - 14.09.2012, 19:59
Re: I'm need chat admin. - by Drake1994 - 14.09.2012, 20:04
Re: I'm need chat admin. - by Userpwon - 14.09.2012, 20:06

Forum Jump:


Users browsing this thread: 1 Guest(s)