Raised This Month: $ Target: $400
 0% 

No Headshot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-10-2009 , 12:48   Re: No Headshot
Reply With Quote #8

arkshine had it formatted correctly.

Are you setting the headshot_active array element to 1\true for the player that you want to be immune to headshots?

Edit: Fixed typo in return line

return headshot_active[ Victim ] && get_pdata_int( Victim, m_LastHitGroup ) == HIT_HEAD ? [->] : [<-] HAM_SUPERCEDE : HAM_IGNORED;

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new headshot_active33 ];
const 
m_LastHitGroup 75;

public 
plugin_init ()
{
    
RegisterHamHam_TakeDamage"player""Event_PlayerTakeDamage" );
    
    
register_concmd"amx_blockhs" "cmdBlockHS" );
}

public 
cmdBlockHSid )
{
    
headshot_activeid ] = 1;
}

public 
Event_PlayerTakeDamage ( const Victim )

    return ( 
headshot_activeVictim ] && ( get_pdata_intVictimm_LastHitGroup ) == HIT_HEAD  ) ) ? HAM_SUPERCEDE HAM_IGNORED;

__________________

Last edited by Bugsy; 06-10-2009 at 13:15.
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 13:59.


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