View Single Post
  #2  
Old 09-08-2011, 10:16 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.
__________________
Reply With Quote