View Single Post
  #2  
Old 03-23-2012, 12:59 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 BlueMelon View Post
PHP Code:

function onCreated(){
  
trigWeapon("Test");
}

function 
trigWeapon(trig){
  
triggerClient("npc","Blue_Temp","triggar",trig);
}

//#CLIENTSIDE

function onActionClientSide(){
  if(
params[0] == "triggar"){
    
findWeapon("Blue/Temp").trigger(params[1], "");
  }

And then ofcourse in Blue/Temp (weapon) I would have on clientside
function onTest(){ player.chat = "test"; }
Anyone have an idea why its not triggering?
Triggerclient does not work within any form of NPC, it works within Weapons.
That aside, there would be no player object within the onCreated event, you would have to do:

PHP Code:
findplayer("account").triggerClient(params); 
Reply With Quote