16.11.2013, 12:25
pawn Код:
stock nearByMessage(playerid, color, string[], Float: Distance = 12.0) {
new
Float: nbCoords[3];
GetPlayerPos(playerid, nbCoords[0], nbCoords[1], nbCoords[2]);
foreach(Player, i) {
if(IsPlayerInRangeOfPoint(i, Distance, nbCoords[0], nbCoords[1], nbCoords[2]) && (GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))) {
SendClientMessage(i, color, string);
}
}
return 1;
}