Quote:
Originally Posted by cbk1994
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);
}
}