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