Raised This Month: $ Target: $400
 0% 

fw_TakeDamage, about armor/health/zombies (Not ZP)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-13-2014 , 00:56   Re: fw_TakeDamage, about armor/health/zombies (Not ZP)
Reply With Quote #1

Quote:
Originally Posted by Compidence View Post
You need to reword your question. What do you need help with exactly?

PHP Code:
        // Get victim armor 
        
static Float:armor 
        pev
(Victimpev_armorvaluearmor
         
        
// If he has some, block the infection and reduce armor instead 
        
if (armor 0.0
            { 
            if (
armor damage 0.0
                
set_pev(victimpev_armorvaluearmor damage
            else 
            
cs_set_user_armor(victim0CS_ARMOR_NONE
             
            return 
HAM_SUPERCEDE
             
        }       
        
// Set Zombie 
        
set_user_zombie(VictimAttacker00
Is that part not working? It looks fine to me.
there's one issue, the fact that the first time the player is hit and his armor drops below 0 he doesn't become a zombie until the next hit
also, I don't recall cs_set_user_armor using float
aron9forever 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 21:14.


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