• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Minecraft 1.16.220 Update + Bug/Crash Fixes
    Added MCPE 1.16.220 version and fixed crashes for multiple plugins. You can view the full changelist here.
  • Forum Updates - 4/11/2021
    Various changes have been made to the forums and a few categories. You can view the full changelist here.

Detect if player inside area

Warning!
Hello , there have been no replies in this thread for more than 30 days.
Please make sure you have a valid reason before you reply to this thread or you may face moderation action.

thedeibo

Department Head
Staff Member
Department Head
Community Team
#1
Description: To be able to Detect if player is inside a chosen set area with cords.

Make sure you put the correct cords in the right place for it to work. All "min" variables must be lower than the "max" variables for it to work correctly!
The "min" and "max" variables are the variables to edit. to make this work.

Code:
let %minX% = 10
let %minY% = 10
let %minZ% = 10
let %maxX% = 200 
let %maxY% = 200
let %maxZ% = 200
let %status% = playerstatus(%p%)
let %playerX% = %status%[\"x\"]
let %playerY% = %status%[\"y\"]
let %playerZ% = %status%[\"z\"]
if (%playerX% >= %minX%) and (%playerX% <= %maxX%) and (%playerY% >= %minY%) and (%playerY% <= %maxY%) and (%playerZ% >= %minZ%) and (%playerZ% <= %maxZ%) then goto 14
message %p% Outside of area
exit
message %p% Inside of Area
exit
This is more of a template for you to do the features that you wish to do. :) Enjoy
 
Last edited: