View Single Post
  #12  
Old 09-03-2008, 06:51 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Vulgar View Post
I was testing on a Trial so I don't know if that makes any difference, it came out of observer and it kept 'loading.'
findlevel(levelname) returns the TServerLevel object.
PHP Code:
if (findlevel("levelname.nw") == null) {
  
// level does not exist

When a person logs off the PlayerLogout event is called everywhere on the server with the player's object being the first parameter. You should be able to use this to check their level but I don't know if you can actually change it since they've basically logged out. Try changing the level from there, and if it doesn't work then you need some kind of script to track whos logged out in a level that could be deleted.
PHP Code:
function onPlayerLogout(p) {
  if (
p.level.name == "levelname.nw") {
    
// they shouldn't be there
    
p.setlevel2("newlevelname.nw"3030);
    
// if this doesn't work, use a system to track them.
  
}

__________________
Reply With Quote