Raised This Month: $ Target: $400
 0% 

disable headshots in server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
am_amx
Senior Member
Join Date: Jul 2010
Location: here
Old 09-04-2010 , 13:55   disable headshots in server
Reply With Quote #1

hi i want to disable head-shots in my servers i found this plugin but player has to wear a helmet i want it without helmet also
http://forums.alliedmods.net/showthread.php?t=56475

Last edited by am_amx; 10-24-2010 at 00:37.
am_amx is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-04-2010 , 14:08   Re: disable headshots in server
Reply With Quote #2

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

#define VERSION "0.0.1"
#define PLUGIN "No HeadShot"

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
RegisterHam(Ham_TraceAttack"player""CBasePlayer_TraceAttack")
}

public 
CBasePlayer_TraceAttackideAttackerFloat:flDamageFloat:vecDir[3], ptrTraceResult /* ,  bitsDamageType */)
{
    new 
Float:flTakeDamage
    pev
(idpev_takedamageflTakeDamage)
    if( 
flTakeDamage == DAMAGE_NO )
    {
        
// game gonna do same check, no need to let it be
        
return HAM_SUPERCEDE
    
}
    if( 
get_tr2(ptrTraceResultTR_iHitgroup) == HIT_HEAD )
    {
        
set_tr2(ptrTraceResultTR_iHitgroupHIT_CHEST)
        return 
HAM_HANDLED
    
}
    return 
HAM_IGNORED

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 09-04-2010 , 14:13   Re: disable headshots in server
Reply With Quote #3

Completely disabled or redirected to chest (Connor's code) ?
__________________

Jack86 is offline
Old 10-23-2010, 02:07
am_amx
This message has been deleted by am_amx.
am_amx
Senior Member
Join Date: Jul 2010
Location: here
Old 10-24-2010 , 00:35   Re: disable headshots in server
Reply With Quote #4

Quote:
Originally Posted by ConnorMcLeod View Post
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "0.0.1"
#define PLUGIN "No HeadShot"

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
RegisterHam(Ham_TraceAttack"player""CBasePlayer_TraceAttack")
}

public 
CBasePlayer_TraceAttackideAttackerFloat:flDamageFloat:vecDir[3], ptrTraceResult /* ,  bitsDamageType */)
{
    new 
Float:flTakeDamage
    pev
(idpev_takedamageflTakeDamage)
    if( 
flTakeDamage == DAMAGE_NO )
    {
        
// game gonna do same check, no need to let it be
        
return HAM_SUPERCEDE
    
}
    if( 
get_tr2(ptrTraceResultTR_iHitgroup) == HIT_HEAD )
    {
        
set_tr2(ptrTraceResultTR_iHitgroupHIT_CHEST)
        return 
HAM_HANDLED
    
}
    return 
HAM_IGNORED

not working
am_amx is offline
GalegO
Member
Join Date: May 2010
Location: Brazil
Old 10-24-2010 , 23:37   Re: disable headshots in server
Reply With Quote #5

I use this in my SRV:

http://forums.alliedmods.net/showthread.php?p=1075600

This works very well
GalegO is offline
am_amx
Senior Member
Join Date: Jul 2010
Location: here
Old 10-25-2010 , 09:01   Re: disable headshots in server
Reply With Quote #6

Quote:
Originally Posted by GalegO View Post
I use this in my SRV:

http://forums.alliedmods.net/showthread.php?p=1075600

This works very well
am_amx is offline
Reply



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 16:34.


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