Raised This Month: $ Target: $400
 0% 

[REQUEST] 1 Headshot = 1 Kill


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MAJESTIC_SZ
Senior Member
Join Date: Mar 2020
Location: Portugal
Old 03-13-2021 , 14:54   Re: [REQUEST] 1 Headshot = 1 Kill
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
CrazY., the damage inflicted can be offset by armor that the player may have, so if a player has 100 hp and you inflict 80 damage, he may only get a loss in hp of 40. I would remove the pev_health part all together and just go a value that is guaranteed to kill, like SetHamParamFloat(3, 999.0). Your plugin was not working for me.

This works
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

const m_LastHitGroup 75;

public 
plugin_init() 
{
    
RegisterHamHam_TakeDamage "player" "HamTakeDamage" );
}

public 
HamTakeDamagevictim inflictor attacker Float:fDamage bitDamage 
{     
    if ( 
get_pdata_intvictim m_LastHitGroup ) == HIT_HEAD )
    {
        
SetHamParamFloat999.0 );
        return 
HAM_HANDLED;
    }
    
    return 
HAM_IGNORED;


Hello Bugsy.

This works.

How can i change the amount of damage made by the headshot?
Like this?

SetHamParamFloat( 4 , 999.0 );

to

SetHamParamFloat( 4 , 110.0 );

Thanks
MAJESTIC_SZ is offline
 



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


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