if(IsPlayerInRangeOfPoint(playerid, Range, My Coords X, Y, Z)) { //function } else { //error message }