08.07.2012, 10:35
Hello
I am trying to create an admin chat, where an admin will be able to chat simply by putting '@' infront of their message. However, ID 0 is able to see his message, and other messages from other admins, but ID 1 is not able to see his message or message from other admins. I've been scratching my head and getting frustrated for a while, but can't see to find the solution. Any ideas?
I am trying to create an admin chat, where an admin will be able to chat simply by putting '@' infront of their message. However, ID 0 is able to see his message, and other messages from other admins, but ID 1 is not able to see his message or message from other admins. I've been scratching my head and getting frustrated for a while, but can't see to find the solution. Any ideas?
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '@')
{
foreach(Player, i)
{
if(PlayerInfo[i][adminlevel] >= 2)
{
format(ccstring, sizeof(ccstring), "[ADM CHAT] %s: %s", GetName(playerid), text[1]);
SendClientMessage(i, CORANGE, ccstring);
return 0;
}
}
}
return 1;
}