Ok so i'm having this problem where i want to stop a command from executing within a 200 by 200 area with the center as 0,70,0 and i used this to do so, PHP: if (($x > 100 or $x > -100) and ($z > 100 or $z > -100)){ return true;} However it goes past the area i want to stop because when a player is in a positive x coordinate $x > -100 includes all the positives as well . how can i stop it at 0 or -1? instead of it going into the positives? or is there a way to do this better?
i would just use new Vector3->distance or you simply meant $x < -100 PHP: <?php$x = -2;if ($x > -1) echo "true1";if ($x < -1) echo "true2"; Code: true2 see https://eval.in/832200
Last time I checked, commands didn't require a Vector. Lett me simplify what you wrote. PHP: if($x > -100 and $z > -100) { return true;} Possibly, you meant a 200x200 region from x(-100 to 100) and z(-100 to 100), which should've been: PHP: if($x > -100 and $x < 100 and $z > -100 and $z < 100){ //Player is in (X={-100, -99, ...100}, Z={-100, -99,... 100})}