View Single Post
  #4  
Old 03-17-2009, 10:23 PM
fragman85 fragman85 is offline
Banned
Join Date: Mar 2009
Location: Switzerland
Posts: 261
fragman85 is on a distinguished road
Well, I think this Thread is not too old yet.

And I'm not sure if Gulthex got help, so let's give him a small Example =P:

PHP Code:
// This function gets triggered by triggerserver();
function onActionServerSide() {
  if (
params[0] == "HP") {
    
clientr.hp -= 20;
  }
}
//#CLIENTSIDE
function onWeaponFired() {
// this.name is the Name of the Weapon that's getting triggered, you can let it stay this.name if you're the same weapon. HP is a parameter, if you use triggerserver more than once, you can check for different params..

  
triggerserver("gui"this.name"HP");

Hope it helped a little, I know, I suck at commenting =P
Everytime you fire your Weapon now, you'd lose 20HP...
Reply With Quote