03.08.2013, 16:14
(
Последний раз редактировалось Virtual1ty; 05.08.2013 в 14:27.
)
-removed-
The code becomes (note that it uses foreach by ******):
Edit: I was wrong. Replaced with a working function.
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);
}
}