Triggeraction.
example:
[/code]
if (actionserverside){
do stuffs;
}
//#CLIENTSIDE
if (weaponfired){
triggeraction 0,0,serverside,Apple Seed,;
}
[/code]
Explaination:
The triggeraction in this NPC Weapon works like this:
NPC Code:
triggeraction x,y,serverside,Weapon Name,params;
In this case, you don't really need an x/y, so I set it to 0.
I put serverside to trigger the action SERVERSIDE. Hence the actionserverside above the clientside part of the script.
params, I'll explain them when you need them. They're tidbits of information, read by #p(NUMBER OF PARAM);
ANYWAYS.
Another example of triggeraction:
NPC Code:
if (actionseed){
do stuffs;
}
//#CLIENTSIDE
if (weaponfired){
triggeraction X,Y,seed,;
}
Explaination:
NPC Code:
triggeraction X,Y,action name,params;
Again, X/Y is the X/Y you want to trigger this action.
The action name is seen in
(actionseed).
Then there are params again.
IMPORTANT
The ACTON-whatevers are Case sensitive.
For instance, if you had WeAPon as the NPC Weapon name:
you would have to use
triggeraction 0,0,serverside,WeAPon,;
in order for it to work.
Hope it helped.