Admin Chat
#3

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
use this:
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(IsPlayerAdmin(playerid) && text[0] == '.')
    {
         new msg[128], pName[MAX_PLAYER_NAME];
         GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
         format(msg, sizeof(msg), "[ADMIN CHAT] %s (ID %d): %s", pName, playerid, text[1]);
         SendMessageToAdmins(colorhere,string);
         return 0;
}
pawn Код:
forward SendMessageToAdmins(color,const string[]);
public SendMessageToAdmins(color,const string[])
{

    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) == 1) if (IsPlayerAdmin(i)) SendClientMessage(i, color, string);
    }
}
tested it works perfectly fine, i hope that helps
Yes.. but i need it to work with this
if(PInfo[playerid][Level] < 1) not rcon..
Before posting please read the topic man
Reply


Messages In This Thread
Admin Chat - by Biess - 28.09.2012, 14:27
Re: Admin Chat rep++ - by XtremeR - 28.09.2012, 14:35
Re: Admin Chat rep++ - by Biess - 28.09.2012, 14:37
Re: Admin Chat rep++ - by iPLEOMAX - 28.09.2012, 14:39
Re: Admin Chat rep++ - by Biess - 28.09.2012, 14:53
Re : Admin Chat rep++ - by yusei - 28.09.2012, 15:10
Re: Re : Admin Chat rep++ - by Biess - 28.09.2012, 15:13
Re: Admin Chat rep++ - by mamorunl - 28.09.2012, 15:16
Re: Admin Chat rep++ - by Biess - 28.09.2012, 15:20

Forum Jump:


Users browsing this thread: 2 Guest(s)