Description
Basically, Im making a claim region skript that no one except the players u add can build or break blocks in. And I want that if a region area is already in use, then you cannot make your region there. What I mean by this is that I don't want players making their regions too close. How can I prevent this?
My Code
The set to diamond was just for testing and it does work. But I want to know if you can check if the looped blocks are already available in another variable. Something like this:
Basically, Im making a claim region skript that no one except the players u add can build or break blocks in. And I want that if a region area is already in use, then you cannot make your region there. What I mean by this is that I don't want players making their regions too close. How can I prevent this?
My Code
Code:
on right click on a chest:
if name of player's tool is "&c&lWand":
cancel event
loop blocks in radius 10 of event-block:
set location of loop-blocks to {crg.regions::%player%}
set {selectedregion.%player%} to true
send "&aSuccessfully selected region!"
send "&aPlease type &7/crg claim <name> &ato claim this region as your own!"
add "%player%" to {crg.trusted::%player%::*}
wait 1 tick
set {crg.regions::%player%} to diamond
The set to diamond was just for testing and it does work. But I want to know if you can check if the looped blocks are already available in another variable. Something like this:
Code:
if {crg.regions::*} = loop-blocks:
send "&cThis region has already been claimed!"