dont use function , to do that in must be serverside, instead of calling the function triggeraction to serverside and put everything in that function in serverside
PHP Code:
if(actionserverside){
if(strequals(#p(0),baddy)){
putnpc2 xy,y,{
join temporary;
join baddy
};
with(npcs[npcscount-1]){
setstring this.type,#s(thiso.type);
setstring this.owner,Baddy;
}
}
}
//#CLIENTSIDE
// 0,0 was used not know weather it was a weapon or local npc
if(created) triggeraction 0,0,serverside,Baddy Placer,baddy;