Use players (local to the levels) instead of allplayers (entire server).
PHP Code:
temp.boxes = {
{0, 0, 10, 10}, // x, y, width, height
{10, 10, 10, 10},
};
temp.box = temp.boxes[int(random(0,temp.boxes.size()))];
for (temp.pl: players) {
if (temp.pl.x in |temp.box[0], temp.box[0] + temp.box[2]| && temp.pl.y in |temp.box[1],temp.box[1]+temp.box[3]|) {
temp.pl.setlevel2("warpout.nw", 30, 30);
}
}