Raised This Month: $ Target: $400
 0% 

[Request] Save HP from last Round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 04-30-2015 , 08:19   Re: [Request] Save HP from last Round
Reply With Quote #1

Make a global var
Code:
 new g_iHealth[33]

Add to hook_death()
Code:
 g_iHealth[id] = Killer_hp

Then Hook Ham_Spawn and do
Code:
 if(g_iHealth[id] > 100) set_user_health(id, g_iHealth[id]) else g_iHealth[id] = get_user_health(id)
__________________
Kia is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 04-30-2015 , 08:49   Re: [Request] Save HP from last Round
Reply With Quote #2

Quote:
Originally Posted by Kia View Post
Make a global var
Code:
 new g_iHealth[33]

Add to hook_death()
Code:
 g_iHealth[id] = Killer_hp

Then Hook Ham_Spawn and do
Code:
 if(g_iHealth[id] > 100) set_user_health(id, g_iHealth[id]) else g_iHealth[id] = get_user_health(id)
Thank you!
Syturi0 is offline
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 20:13.


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