Quote:
Originally Posted by Vulgar
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", 30, 30);
// if this doesn't work, use a system to track them.
}
}