Raised This Month: $ Target: $400
 0% 

[Solved] Show Final Damage done


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 10-18-2015 , 07:04   [Solved] Show Final Damage done
Reply With Quote #1

PHP Code:
 if(zp_get_user_zombie(id) != zp_get_user_zombie(i)) {
                        
get_user_name(i,name,31)
                        static 
Float:fVelocity[3]
                        
pev(ipev_velocityfVelocity)
                        
xs_vec_mul_scalar(fVelocity2.75fVelocity)
                        
fVelocity[2] *= 1.75
                        set_pev
(ipev_velocityfVelocity)
      
            
client_cmd(i,"spk fvox/flatline.wav")
            
msg_screen_fade(i325500235)
            
ColorChat(idGrey"^x04[Jetpack+Bazooka]^x01 Damage to^x03 %s^x01 ::^x04 %i damage"namefloatround(damage))
                            
                        if(
hp damage)
                        {                       
                
ExecuteHamB(Ham_TakeDamageientityiddamageDMG_BLAST)
                    
msg_screen_shake(i255<<1010<<10255<<10)
                        }
                        else
                        {
                            
ExecuteHamB(Ham_Killediid2// set last param to 2 if you want victim to gib
                        
}
                    }
            } 
As you see im using ExecuteHamB to deal damage on victims:
ExecuteHamB will go through some hooks and because of this the damage shown in print_chat (floatround(damage)) is not showing the exact damage done.

What should I do to correct the damage shown in chat?

Last edited by Chihuahuax; 10-19-2015 at 10:04.
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
 



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 22:11.


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