07.05.2015, 12:40
Hello!
Try this:
Try this:
PHP код:
public OnPlayerText(playerid,text[])
{
new string[145];
if(text[0] == '#' && PLayerInfo[playerid][Admin] >= 1)
{
GetPlayerName(playerid,string,sizeof string);
format(string,sizeof string,"Admin Chat: %s: %s",string,text[1]);
MessageToAdmins(COLOR_VERDE,string);
}
return 0;
}
stock MessageToAdmins(colore,const string[])
{
for(new i;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i) || IsPlayerNPC(i) || PlayerInfo[i][Admin] < 1)continue;
SendClientMessage(i,colore,string);
}
return 1;
}