Thread: Classes help
View Single Post
  #8  
Old 01-12-2008, 08:19 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
You need to have the shape of the npc set on serverside if you want it to be able to receive actions. Also you should be triggering the action on this.x and this.y not 0 and 0.

Though after looking at the script a second time I noticed its a weapon script, since you're using onWeaponFired(), in that case you need to do something different.

This script is for doing it in a weapon.
PHP Code:
function onActionServerSide() {
  if (
params[0] == "gotsplaced") {
    
//stuff
  
}
}
//#CLIENTSIDE
function onWeaonFired() {
  
triggerserver("weapon"this.name"gotsplaced");

This is for an NPC.
PHP Code:
function onCreated() {
  
setshape(13232);
}
function 
onActionGotsPlaced() {
  
// do stuff
}
//#CLIENTSIDE
function onCreated() {
  
setshape(13232);
}
function 
onWhateverEventYouNeed() {
  
triggeraction(this.xthis.y"GotsPlaced"yourparametershere);

__________________
Reply With Quote