I am making a Chance event and everything is good except how to check if the chosen number of the box has any players inside it, right now I have this
PHP Code:
for (temp.pl: allplayers) {
if (temp.pl.level.name == this.level.name && playersInLevel >= 2) {
{
if (temp.pl.x in | coords[box - 1][0], coords[box - 1][1] | && temp.pl.y in | coords[box - 1][2], coords[box - 1][3] | ) {
playerInBox = true;
Now this works but it is very buggy (wont cycle through different boxes, it chooses a player and no matter how many times you grab the block it still chooses the same box), can someone help me with the best way to do this event?