[admin] chat help
#3

Why not simply use this:
Код:
dcmd_a(playerid,params[])
{
	new string[128];
	if(!strlen(params))
	{
	    SendClientMessage(playerid,WHITE,"Usage /a (Message)");
	    return 1;
	}
	if(IsSpawned[playerid] == 0)
	{
	    SendClientMessage(playerid, -1,"{FF0000}[ERROR]{FFFFFF}You must be spawned in order to be able to use this command.");
	    return 1;
	}
	format(string,sizeof(string),"[ADMIN CHAT] %s(%d): %s",PlayerName(playerid),playerid,params);
	IRC_GroupSay(gGroupAdminID,IRC_ADMINCHANNEL,string);
	for(new i=0; i<MAX_PLAYERS; i++)
	{
	    if(AdminLevel[i] >= 1)
	    {
	        format(string,sizeof(string),"[ADMIN CHAT] %s(%d): %s",PlayerName(playerid),playerid,params);
	        SendClientMessage(i,COLOR_ADMIN,string);
		}
	}
	return 1;
}
Reply


Messages In This Thread
[admin] chat help - by yvoms - 11.03.2014, 04:43
Re: [admin] chat help - by Threshold - 11.03.2014, 04:50
Re: [admin] chat help - by Sojo12 - 11.03.2014, 09:53
Re: [admin] chat help - by biker122 - 11.03.2014, 13:08
Re: [admin] chat help - by Sojo12 - 11.03.2014, 14:01

Forum Jump:


Users browsing this thread: 1 Guest(s)