OnPlayerText question
#2

pawn Code:
public OnPlayerText(playerid, text[])
{
    new string[56];
    new PlayerName[MAX_PLAYER_NAME];
    for(new i; i<MAX_PLAYERS; i++)
    {
        new Float:XXX,Float:YYY,Float:ZZZ;
        GetPlayerPos(playerid, XXX, YYY, ZZZ);
        if(IsPlayerInRangeOfPoint(i, 25.0, XXX, YYY, ZZZ))
        {
            format(string, sizeof(string), "%s says: %s",PlayerName,text);
            SendClientMessage(i, 0xFF0000AA, string);
        }
    }
    return 1;
}
You had no opening brace after the 'for' loop.

EDIT: Removed bad advice.
Reply


Messages In This Thread
OnPlayerText question - by Pawno_Master - 04.09.2010, 10:15
Re: OnPlayerText question - by iggy1 - 04.09.2010, 10:20
Re: OnPlayerText question - by Pawno_Master - 04.09.2010, 10:28
Re: OnPlayerText question - by iggy1 - 04.09.2010, 10:29
Re: OnPlayerText question - by General Abe - 04.09.2010, 10:30
Re: OnPlayerText question - by iggy1 - 04.09.2010, 10:37
Re: OnPlayerText question - by Pawno_Master - 04.09.2010, 15:33
Re: OnPlayerText question - by General Abe - 04.09.2010, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)