Raised This Month: $ Target: $400
 0% 

Max Health HELP


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 01-21-2013 , 05:13   Max Health HELP
Reply With Quote #1

Hey. I need help with max health stock. People have their health above 100, so this stock is kinda useless. How do i get their actual max health (not 100). Im running ZM server, so HP changes dynamically (change Zp class)
PHP Code:
stock get_user_maxhealthidUser )
{
    new 
maxHealth 100

    
static iSkillLevel;
    
iSkillLevel SM_GetSkillLevelidUserSKILL_DEVOTION );

    
// Human Devotion Skill
    
if ( iSkillLevel )
    {
        
maxHealth += iSkillLevel p_devotion;
    }

    
// For talisman +
    // Player has a health bonus from the Periapt of Health
    
if ( ITEM_HasidUserITEM_HEALTH ) > ITEM_NONE || fWorkTalismanPassive(idUserarrTalismanActive[idUser]) == TALISMAN_ITEM_HEALTH )
        
maxHealth += get_pcvar_numCVAR_wc3_health );
        
    if(
maxHealth 255)
        
maxHealth 255;
        
    return 
maxHealth

Can i simply use
PHP Code:
pev(idUserpev_max_healthmaxHealth
Instead of
PHP Code:
new maxHealth 100 
Podarok is offline
 


Thread Tools
Display Modes

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 13:46.


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