AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   Question about add health (https://forums.alliedmods.net/showthread.php?t=250309)

ghost95v 10-21-2014 21:14

Question about add health
 
has another way to give user health, Without set_user_health(id,get_user_health(id) + amount ); ?

wickedd 10-21-2014 21:53

Re: Question about add health
 
Yes. But what's wrong with set_user_health?

zmd94 10-21-2014 21:57

Re: Question about add health
 
You also can use this:
PHP Code:

set_pev(idpev_healthpev(idpev_health) + get_pcvar_float(cvar_health_amount)) 

Yet, you need #include <fakemeta>. ;)

ghost95v 10-22-2014 09:04

Re: Question about add health
 
Quote:

Originally Posted by zmd94 (Post 2214248)
You also can use this:
PHP Code:

set_pev(idpev_healthpev(idpev_health) + get_pcvar_float(cvar_health_amount)) 

Yet, you need #include <fakemeta>. ;)

thank you zmd94. wickedd when i increase cvar "zp_zombie_first_hp" was having a runtime error with 1 zobmbie class.

zmd94 10-22-2014 10:09

Re: Question about add health
 
Then, maybe there is a problem with the zombie class.

HamletEagle 10-22-2014 10:40

Re: Question about add health
 
Then you should add some checks to filter dead players/ disconnected players/bots and so on.

ghost95v 10-22-2014 14:20

Re: Question about add health
 
Quote:

Originally Posted by HamletEagle (Post 2214441)
Then you should add some checks to filter dead players/ disconnected players/bots and so on.

my problem seems weird, cuz i have 2 zombie classes with same abilities, diffrent models... but this z class its giving runtime error... Now i changed the way to give him some health, and problem its not anymore... ;)


All times are GMT -4. The time now is 08:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.