Thread: Health System
View Single Post
  #1  
Old 02-09-2008, 05:47 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Health System

im creating a health system for my server, and i was wondering, how do you make sure that when you damage a player that you can tell you killed them. this is what i have so far. I only spent a couple of minutes, and i was wondering, can anyone help me? i am not to good at scripting. and the server is gonna have a ranking system ( like ranks for each class. ) and class system. im still working on everything, because i have no staff xD

PHP Code:
function onActionServerSide() 

 if (
params[0] == "hurt"
 { 
  
clientr.hp -= clientr.weapon_damage;
 } 
 elseif (
params[0] == "dead")
 {
  
clientr.hp 0;
  
clientr.deaths += 1;
 }
 elseif (
params[0] == "kill")
 {
  
clientr.kills_@clientr.weapon += 1;
  
clientr.exp += 4;
  
clientr.message "You have killed " @temp.player_hit;
 }
 elseif (
params[0] == "revive")
 {
  
clientr.hp clientr.hp_max;
  
setlevel2("final_osl.nw"3030);
 }
}

//#CLIENTSIDE
function onCreated()
{
 
clientr.hp 100;
 
clientr.hp_max 100;
 
clientr.deaths 0;
 
clientr.kills 0;
 
setTimer0.05 );

__________________
I am the devil, I am here to do to devils work.
Reply With Quote