Quote:
Originally Posted by Mean
pawn Code:
CMD:w(playerid,params[]) { new string[128], Player[MAX_PLAYER_NAME]; new Float:x, Float:y, Float:z; GetPlayerName(playerid, Player, MAX_PLAYER_NAME); GetPlayerPos(playerid, x, y, z); format(string, 128, "[WHISPER] %s: %s", Player, params); for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerInRangeOfPoint(playerid, 15.0, x, y, z)) SendClientMessage(i, COLOR_WHITE, string); return 1; }
Everyone can hear this, not only the player that is in range of 15
|
In the for-loop you once mixed up 'i' and 'playerid' when checking the range.