View Single Post
  #1  
Old 09-14-2010, 01:39 AM
Deathborn123 Deathborn123 is offline
Owner of Dev Deathborn123
Deathborn123's Avatar
Join Date: Aug 2008
Location: Germany
Posts: 21
Deathborn123 is on a distinguished road
Npc |Server - Clientside| Communication

Hey guys!

I'm just making a baddysystem. So I'm wondering how you communicate between Clientside and Serverside in an npc class. To make a bit more understandable:

Baddy Class ( if the baddy gets hit)
PHP Code:
function onActionhurt()
{
if (
this.npchp params[0])
{
this.npchp -= params[0];
this.chat this.npchp;
}
else
{
this.npchp this.npchpmax;
this.chat this.npchp;
"-xpcalculator".Actionxp(this.npclevel);
}

Aight, so basicly what im doin is, whenever the baddy dies, it calls the public function "Actionxp" of the weapon "-xpcalculator". So everything works fine, if the baddy class is //#CLIENTSIDE. The problem is i dont want my baddies clientside, so my aim is to remove the //#CLIENTSIDE but if i do it he cant find the public function "Actionxp" anymore. Hope you got me and hope you got any resolutions for that

So far...
__________________
You cannot Prevent and Prepare for War at the same Time.
Reply With Quote