Quote:
Originally Posted by Gunderak
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.