Raised This Month: $ Target: $400
 0% 

Head Shot Only


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-11-2009 , 23:34   Head Shot Only
Reply With Quote #1

To get head shots only could i do something like the following.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
 
new ison
public plugin_init() {
 
register_plugin("Head Shot Only""1.0""NcB_Sav")
 
ison register_cvar("hs_on""1")
 
RegisterHam(Ham_TraceAttack"player""ham_traceattack_player")
 
}

public 
ham_traceattack_player(iVictimiAttackerFloat:damageFloat:direction[3], traceresultdamagebits)
{
    if(
get_tr2(traceresultTR_iHitgroup) != HIT_HEAD || get_pcvar_num(ison))
    {
        
//set_tr2(traceresult, TR_iHitgroup, HIT_CHEST)
        
return HAM_HANDLED
    
}
    return 
HAM_IGNORED


Last edited by Doc-Holiday; 01-11-2009 at 23:46.
Doc-Holiday 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 01:45.


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