Raised This Month: $ Target: $400
 0% 

What can I add to script to ignore the m3


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
padilha007
Senior Member
Join Date: Jul 2008
Old 04-12-2009 , 15:54   Re: What can I add to script to ignore the m3
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>

#define MY_PLUGIN_NAME "No Headshot With Helmet"
#define MY_PLUGIN_VERSION "1.1.0"
#define MY_PLUGIN_AUTHOR "Simon Logic"

#define HIT_SHIELD 8

new g_iMaxPlayers
new g_cvarSHelmetThreshold

public plugin_init()
{
    
g_iMaxPlayers get_maxplayers()

    
register_plugin(MY_PLUGIN_NAMEMY_PLUGIN_VERSIONMY_PLUGIN_AUTHOR)
    
register_cvar("version_no_headshot_with_helme t"MY_PLUGIN_VERSIONFCVAR_SERVER|FCVAR_SPONLY)

    
g_cvarSHelmetThreshold register_cvar("amx_superhelmet_when_armor""0")

    
//register_forward(FM_TraceLine, "onTraceLine")
    
register_forward(FM_TraceLine"onTraceLinePost"1)
}

public 
onTraceLinePost(Float:v1[3], Float:v2[3], fNoMonsterspentToSkipptr)
{
    
//engfunc(EngFunc_TraceLine, v1, v2, fNoMonsters, pentToSkip, ptr)

    
static iHitEntiHitEnt get_tr2(ptrTR_pHit)

    if(
<= iHitEnt <= g_iMaxPlayers)
    {
        static 
iArmor
        
static CsArmorType:tArmor
        
        iArmor 
cs_get_user_armor(iHitEnttArmor)
        
        if(
iArmor && tArmor == CS_ARMOR_VESTHELM && get_tr2(ptrTR_iHitgroup) == HIT_HEAD && get_user_weapon(iHitEnt) != CSW_M3)
        {
            
iHitEnt get_pcvar_num(g_cvarSHelmetThreshold// re-use iHitEnt
            
if(iHitEnt && iArmor >= iHitEnt)
            
iHitEnt HIT_SHIELD
            
else
            
iHitEnt HIT_GENERIC
            
            set_tr2
(ptrTR_iHitgroupiHitEnt)
        }
    }

    
//return FMRES_SUPERCEDE

__________________

padilha007 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 02:26.


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