View Single Post
  #11  
Old 09-03-2012, 03:34 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 scriptless View Post
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
triggerServer("gui", this.name, "puts", player.x, player.y); 
} 
While that would be fine for a weapon script, there is no 'this.name' within a local NPC on Clientside. You can however store it as an attr Serverside. The first parameter should also be 'npc' rather than 'gui'.

PHP Code:
function onCreated(){
  
this.attr[1] = this.name;
}
//#CLIENTSIDE
function sendTrigger(){
  
triggerserver("npc", this.attr[1], mousex, mousey);
} 
Reply With Quote