Actually, if you're just using
players (not
TServerLevel.players), on a GMAP it will only nuke the surrounding levels (one level on each side of the player's current level iirc).
Instead of doing
PHP Code:
if (temp.pl.account != player.account) {
just do
PHP Code:
if (temp.pl != player) {
There's no reason to compare accounts here when you can just compare the player objects.
Your
player.chat = "Nuked Everyone!"; should be outside of the
for loop, there's no reason to have it inside. You won't notice a difference, but what you're doing when it's in the
for loop is setting the current player's (not the nuked player's) chat multiple times.
Instead of that ridiculous timeout to move the objects, just do the same thing in a
GraalControl.onResize event.
Besides that the script looks fine. I'd recommend using
if-
else statements instead of a bunch of
if statements which are mutually exclusive as it makes your purpose clearer to the reader.