Thread: Health System
View Single Post
  #2  
Old 02-09-2008, 05:51 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Well, you could just do
PHP Code:
if (params[0] == "hurt")  
 {  
  
clientr.hp -= clientr.weapon_damage;
  if (
clientr.hp <= 0)
  {
    
clientr.dead 1;
    
clientr.deaths += 1;
  }
 } 
And have a timeout check for clientr.dead in the clientside part of the script, and if it equals 1, then freeze the player or w/e for when hes dead.
And btw, you need to set the clientr. flags serverside.

Edit: I worded it wrong, sorry
Reply With Quote