Here is my situation:
A weapon places a class with putnpc2.
The same weapon also does a triggeraction which the class npc recieves clientside with paramaters. That works.
What does not work is when the action is detected clientside in the class, the class npc is supposed to do a triggeraction serverside on itself, becasue the addweapon command has to be done serverside. Why does the putnpc2 class not do a triggeraction on itself, but this same code works in a weapon?
actiondrop gets called succesfully, but the serverside part in the class here does not get called at all. #p(1) in the actiondrop is the weapon name passed from the weapon. The class is called weaponpickup
PHP Code:
if (actionserverside)
{
addweapon #p(0);
destroy;
}
//#CLIENTSIDE
if (actiondrop)
{
//code not reated to my problem removed - this part works
}
if (playertouchsme)
{
triggeraction 0,0,serverside,weaponpickup,#p(1); //also tried doing it on x and y
}
Any help would be greatly appreciated.