Raised This Month: $ Target: $400
 0% 

[REQUEST] 1 Headshot = 1 Kill


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-25-2023 , 14:36   Re: [REQUEST] 1 Headshot = 1 Kill
Reply With Quote #8

Try this.. If you don't want knife to count either, change "( DMG_BULLET | DMG_SLASH )" to just "DMG_BULLET"
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 ) && ( bitDamage & ( DMG_BULLET DMG_SLASH ) ) )
    {
        
SetHamParamFloat999.0 );
        return 
HAM_HANDLED;
    }
    
    return 
HAM_IGNORED;

__________________

Last edited by Bugsy; 03-25-2023 at 14:39.
Bugsy 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