View Single Post
  #3  
Old 06-14-2010, 08:56 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by cbk1994 View Post
I agree at the annoyance of restarting the client. It'd be nice if the delay was fixed as well. On Era we do:

PHP Code:
function onActionServerSide(cmd) {
  if (
cmd "requestReady") {
    
player.triggerClient("gui"this.name"clientsideReady");
  }
}
//#CLIENTSIDE
function onCreated() {
  
player.join("player");
  
player.triggerServer("gui"name"requestReady");
}

function 
onActionClientSide(cmd) {
  if (
cmd == "clientsideReady") {
    for (
temp.weapon player.weapons) {
       
weapon.trigger("playerReady"null);
    }
  }

And then any scripts that call player functions can use the event onPlayerReady instead of onCreated. Hope that helps someone with this problem.
I find that some classes actually take longer to load than others (presumably down to their amount of characters), so I use an initialization class that waits until the function exists.
Reply With Quote