GetClosestPlayer(playerid){ new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); for(new i; i < GetMaxPlayers();i++) { if(IsPlayerInRangeOfPoint(i,10000,x,y,z)) return i; } return -1;}