View Single Post
  #5  
Old 06-14-2010, 09:02 PM
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
Probably not a bad idea. Something like

PHP Code:
while (! ("myfunction" in player.getFunctions())) {
  
sleep(0.05);

?
More like:

Weapon/NPC -

PHP Code:
//#CLIENTSIDE
function onCreated(){
  
this.onAttemptInitialize();
}

function 
canInitialize(){
  return 
player.hasFunction("myFunction");
}

function 
initialize(){
  
player.myFunction();

Class -
PHP Code:
//#CLIENTSIDE
function onAttemptInitialize(){
  if(
this.canInitialize()){
    
this.initialize();
  }
  else{
    
this.scheduleEvent(0.05"AttemptInitialize"NULL);
  }

Reply With Quote