Loop problem
#1

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?

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;
}
Reply


Messages In This Thread
Loop problem - by DBan - 08.07.2012, 10:35
Re: Loop problem - by clarencecuzz - 08.07.2012, 10:45
Re: Loop problem - by DBan - 08.07.2012, 10:58
Re: Loop problem - by Slappybay - 08.07.2012, 11:02
Re: Loop problem - by ReneG - 08.07.2012, 11:05
Re: Loop problem - by DBan - 08.07.2012, 11:09
Re: Loop problem - by clarencecuzz - 08.07.2012, 11:09
Re: Loop problem - by Vince - 08.07.2012, 11:09
Re: Loop problem - by ReneG - 08.07.2012, 11:11
Re: Loop problem - by DBan - 08.07.2012, 11:16

Forum Jump:


Users browsing this thread: 1 Guest(s)