if(IsPlayerInRangeOfPoint(playerid, 2.0, X, Y, Z)){//what happens if you are in range}else{// what happens if you don't are in range}