Send message for near player
#2

-removed-
The code becomes (note that it uses foreach by ******):
pawn Код:
stock SendMessageToNearByPlayers(playerid, text[])
{
    new
        Float:pX,
        Float:pY,
        Float:pZ
    ;

    GetPlayerPos(playerid, pX, pY, pZ);

    foreach (new i : Player)
    {
        if (IsPlayerInRangeOfPoint(i, 2.0, pX, pY, pZ))
            SendClientMessage(i, 0xFFFFFFFF, text);
        else if (IsPlayerInRangeOfPoint(i, 4.0, pX, pY, pZ))
            SendClientMessage(i, 0xFF949494, text);
        else if (IsPlayerInRangeOfPoint(i, 6.0, pX, pY, pZ))
            SendClientMessage(i, 0xFF373737, text);
    }
}
Edit: I was wrong. Replaced with a working function.
Reply


Messages In This Thread
Send message for near player - by Garwan50 - 03.08.2013, 15:49
Re: Send message for near player - by Virtual1ty - 03.08.2013, 16:14
Re : Send message for near player - by Garwan50 - 03.08.2013, 16:40
Re : Send message for near player - by Garwan50 - 03.08.2013, 17:13
Re : Send message for near player - by Garwan50 - 03.08.2013, 19:18
Re: Send message for near player - by stokdam - 03.08.2013, 19:39
Re: Send message for near player - by [KHK]Khalid - 03.08.2013, 19:53
Re : Send message for near player - by Garwan50 - 03.08.2013, 20:47
Re : Send message for near player - by Garwan50 - 04.08.2013, 09:23
Re: Send message for near player - by stokdam - 04.08.2013, 19:02

Forum Jump:


Users browsing this thread: 1 Guest(s)