cmds problem
#6

You're welcome. The reason that it wasn't working is because you had:

COLOR_PURPLE once.

Where as it was defined to be used in that stock 5 times.

The best way to solve this would be:

pawn Код:
forward CloseMessageEx(playerid, color, string[], Float:range);

public CloseMessageEx(playerid, color, string[], Float: range)
{
    new Float: PlayerX, Float: PlayerY, Float: PlayerZ;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerPos(playerid, PlayerX, PlayerY, PlayerZ);
            if(IsPlayerInRangeOfPoint(i, range, PlayerX, PlayerY, PlayerZ))
            {
                if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
                {
                    SendClientMessage(i, color, string);
                }
            }
        }
    }
}
Much quicker and easier to use.
Reply


Messages In This Thread
cmds problem - by N0FeaR - 18.06.2012, 01:24
Re: cmds problem - by WagnerPM - 18.06.2012, 01:29
Re: cmds problem - by iGetty - 18.06.2012, 01:30
Re: cmds problem - by WagnerPM - 18.06.2012, 01:35
Re: cmds problem - by N0FeaR - 18.06.2012, 01:35
Re: cmds problem - by iGetty - 18.06.2012, 01:40

Forum Jump:


Users browsing this thread: 1 Guest(s)