Raised This Month: $ Target: $400
 0% 

True armor


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 05-15-2011 , 05:00   True armor
Reply With Quote #1

Not sure why but for some reason this works like this. It deducts the right about of armor. but armor hits 0 it dosent start to damage the health.

PHP Code:
public PlayerHurt(vicinfattFloat:dmgdamagebits)
{
    if(
vic == g_iVIPid)
    {
        new 
CsArmorType:iPlayerArmorType;
        new 
Float:armor float(cs_get_user_armor(viciPlayerArmorType));
        new 
Float:new_armor armor dmg;
        
        if(
new_armor <= 0)
        {
            
cs_set_user_armor(vic0CS_ARMOR_NONE);
            
SetHamParamFloat(4dmg armor);
            return 
HAM_SUPERCEDE;
        }
        else
        {
            
cs_set_user_armor(vicfloatround(new_armorfloatround_round), CS_ARMOR_VESTHELM);
            
SetHamParamFloat(40.0);
            return 
HAM_SUPERCEDE;
        }
        
        return 
HAM_IGNORED;
    }


Last edited by Doc-Holiday; 05-15-2011 at 05:26.
Doc-Holiday 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 04:20.


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