Admin Chat
#7

Like this :

Код:
public OnPlayerText(playerid, text[])
{	
    if(text[0] == '!') // Change symbol
    {
        if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
	{
            new string[256];
	    format(string, sizeof(string), "A.CHAT %s : %s", PlayerName(playerid), text[1]);
	    for(new i, j = GetPlayerPoolSize(); i <= j; i++)
	    {
	        if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1)
		SendClientMessage(i, COLOR_PURPLE, string);
	    }
	    return 0; 
        }
    }
    return 1;
}
Or use a stock for fast :

Код:
// stock by nogh445
stock SendAdminMessage(col, const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] >= 1)
        SendClientMessage(i, col, string);
    }
    return 1;
}
Reply


Messages In This Thread
Admin Chat - by Gotham - 30.09.2016, 16:00
Re: Admin Chat - by Younes44 - 30.09.2016, 16:03
Re: Admin Chat - by iLearner - 30.09.2016, 18:22
Re: Admin Chat - by Quinncell - 30.09.2016, 18:27
Re: Admin Chat - by CannonBolt - 30.09.2016, 18:40
Re: Admin Chat - by Quinncell - 30.09.2016, 18:45
Re: Admin Chat - by ActionTanki91 - 30.09.2016, 19:08
Re: Admin Chat - by CannonBolt - 30.09.2016, 19:31
Re: Admin Chat - by Quinncell - 30.09.2016, 21:00
Re: Admin Chat - by Logic_ - 01.10.2016, 09:11

Forum Jump:


Users browsing this thread: 1 Guest(s)