Raised This Month: $ Target: $400
 0% 

max hp amount


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-08-2014 , 03:00   Re: max hp amount
Reply With Quote #3

Here is a version using HamSandwich

Code:
#inlcude <amxmodx> #include <hamsandwich> #inlclude <fun> new hp_limit[33] public plugin_init(){     register_plugin("HP Limit", "v1.00", "XxXxXxXxX")     RegisterHam(Ham_TakeHealth, "player", "evt_HamHeal") } public evt_HamHeal(id) {     new iHp = get_user_health(id)     if (iHp > hp_limit[id])     {         set_user_health(id, hp_limit[id])     } }

EDIT:
Quote:
Originally Posted by aron9forever View Post
public plugin_init()
{
register_event("Health", "EventHealth", "be", "1>0");
}
public EventHealth(client)
{

currenthp=get_user_health(client)
if(currenthp>g_maxhp[client])
{
set_user_health(client, g_maxhp[client])
}

}
P.S. Place code in pawn / code / php BB markups
__________________

Last edited by ezio_auditore; 05-08-2014 at 03:11.
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
 



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 09:37.


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