11.03.2014, 09:53
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;
}
