View Single Post
  #9  
Old 07-07-2011, 05:00 AM
Arch_Angel Arch_Angel is offline
Registered User
Join Date: Apr 2007
Posts: 482
Arch_Angel is on a distinguished road
Send a message via AIM to Arch_Angel
Quote:
Originally Posted by fowlplay4 View Post
Unless a function was added to handle it, I've been using a timeout loop. I.e:

PHP Code:
function onCreated() {
  
this.lastRCs = "";
  
onTimeout();
}

function 
onTimeout() {
  
temp.rcs = {};
  for (
temp.a: allplayers) {
    if (
temp.a.level == NULL) {
      
temp.rcs.add(temp.a);
    }
  }
  if (
temp.rcs.size() > this.lastRCs.size()) {
    
// RCs have logged on.
    
sendtorc("Staff Reminder! You're all special C:");
  }
  
this.lastRCs = temp.rcs;
  
setTimer(0.5);
} 
That's just a way I've doing it though.

Also instead of maintaining a 'this.staff' array you can just directly reference your server options.

temp.staff = serveroptions.staff.tokenize(",");

The tokenize(",") is just in case someone messes up the array formatting.
little complicated for me to fully understand how you coded everything, but thats a giant help. Thanks, appreciate it.!

rep++ if i can
Reply With Quote