Custom OnPlayerText(for teams)
#1

ive got it set so when you type normal text, it sends to your team, but for some reason, it also sends globally, and I cant understand that because it returns 0 like it should

here is the command

pawn Код:
public OnPlayerText(playerid, text[])
    {
    new message[128];
    format(message, sizeof(message), "[Team Chat] %s {%d}: %s", GetName(playerid), playerid, text);
    foreach (new i : Player)
            {
            if(GetPlayerTeam(i) == GetPlayerTeam(playerid))
                {
                SCM(i, COLYELLOW, message);
                return 1;
                }
            }
    return 0; //should stop the problem, no?
    }
I also get no errors or warnings.
Reply


Messages In This Thread
Custom OnPlayerText(for teams) - by Mattakil - 16.06.2013, 15:37
Re: Custom OnPlayerText(for teams) - by OrMisicL - 16.06.2013, 15:45
Re: Custom OnPlayerText(for teams) - by Mattakil - 16.06.2013, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)