Raised This Month: $ Target: $400
 0% 

Solved dmg without killing (dmg Armor only)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 03-22-2017 , 18:06   dmg without killing (dmg Armor only)
Reply With Quote #1

Hi, i try to get victim dmg without killing ( i want only dmg for armor not health)
That's what I thought from the beginning but I did not succeed in achieving it. Is there any help?
PHP Code:
public plugin_init() {

    
RegisterHam(Ham_TraceAttack,"player","fw_TraceAttack")
}
public 
fw_TraceAttack(victiminflictorFloat:damageFloat:direction[3], traceresultdamagebits){
        
    if(
get_user_weapon(inflictor) == HLW_CROWBAR && get_user_armor(victim))
    {        
        
set_user_health(victimget_user_health(victim))
        
        
SetHamParamFloat(3100.0)
        
        return 
HAM_HANDLED;
    }
    return 
HAM_IGNORED

My question: is it possible to block victim's death if the damage inflicted to the victim is greater then the victim's hp?
__________________

Last edited by abdobiskra; 10-06-2017 at 12:17.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
 



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 17:55.


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