Admin Chat
#1

If player not a admin but still use the command
it send to the admin like Test:
Код:
CMD:achat(playerid, params[])
{
	new string[128];
    new result[128];
	if (PlayerInfo[playerid][pAdmin] >= 3)
    if(sscanf(params,"s[128]",result))
    {
              SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /achat [Message]");
    }
	for (new i; i < MAX_PLAYERS; i++)
	{
        if (PlayerInfo[i][pAdmin] >= 3)
	    {
            new pName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, pName, sizeof(pName));
            if (PlayerInfo[i][pAdmin] >= 3)format(string, 128, "Admin Chat: %s: %s", pName, result);
            SendClientMessage(i, 0xFFFFFFFF, string);
	    }
	}
	return 1;
}
Reply


Messages In This Thread
Admin Chat - by Ryan50 - 24.09.2015, 01:27
Re: Admin Chat - by Kqly - 24.09.2015, 01:55
Re: Admin Chat - by Ryan50 - 24.09.2015, 01:57
Re: Admin Chat - by Lordzy - 24.09.2015, 02:35
Re: Admin Chat - by Aly - 24.09.2015, 02:49

Forum Jump:


Users browsing this thread: 1 Guest(s)