Raised This Month: $32 Target: $400
 8% 

Question about add health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 10-21-2014 , 21:14   Question about add health
Reply With Quote #1

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

Last edited by ghost95v; 10-21-2014 at 21:15.
ghost95v is offline
Send a message via Skype™ to ghost95v
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-21-2014 , 21:53   Re: Question about add health
Reply With Quote #2

Yes. But what's wrong with set_user_health?
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-21-2014 , 21:57   Re: Question about add health
Reply With Quote #3

You also can use this:
PHP Code:
set_pev(idpev_healthpev(idpev_health) + get_pcvar_float(cvar_health_amount)) 
Yet, you need #include <fakemeta>. ;)

Last edited by zmd94; 10-21-2014 at 21:58.
zmd94 is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 10-22-2014 , 09:04   Re: Question about add health
Reply With Quote #4

Quote:
Originally Posted by zmd94 View Post
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.
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-22-2014 , 10:09   Re: Question about add health
Reply With Quote #5

Then, maybe there is a problem with the zombie class.
zmd94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-22-2014 , 10:40   Re: Question about add health
Reply With Quote #6

Then you should add some checks to filter dead players/ disconnected players/bots and so on.
__________________
HamletEagle is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 10-22-2014 , 14:20   Re: Question about add health
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
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... ;)
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:12.


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