View Single Post
  #4  
Old 02-28-2012, 03:19 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Gunderak View Post
Also is there a way to detect when RC players log on?
PHP Code:
function onPlayerLogin(temp.object)
{
  
// Let's check if it's a player object to begin with. I could be mistaken, but I vaguely remember IRC channels or something triggering this.
  
if (temp.object.account == "")
    return;
  
  
// Ok, it's a player. Let's check if it's an RC or not by reading the level name.
  
if (temp.object.level.name == "") {
    
// Not in a level, must be an RC!
  
}
  else {
    
// The player is in a level, so it's not an RC.
  
}

Substitute onPlayerLogin with onPlayerLogout for the other way around.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote