AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Mortal Headshot v0.1.1 (https://forums.alliedmods.net/showthread.php?t=163585)

MAJESTIC_SZ 03-24-2021 21:55

Re: Mortal Headshot v0.1.1
 
Hello?

MAJESTIC_SZ 04-02-2021 16:30

Re: Mortal Headshot v0.1.1
 
hello ?

Napoleon_be 04-03-2021 18:41

Re: Mortal Headshot v0.1.1
 
I'm sorry, i'm quite inactive at the moment, maybe someone else is interested in helping you.

MAJESTIC_SZ 08-15-2022 13:10

Re: Mortal Headshot v0.1.1
 
Hello

bibu 08-16-2022 03:31

Re: Mortal Headshot v0.1.1
 
Try this:

PHP Code:

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

#define IsPlayer(%1) (1<= %1 <= g_iMaxPlayers)
#define MAX_WEAPONS CSW_P90

const bitsNotAllowedWeapons << CSW_SMOKEGRENADE << CSW_HEGRENADE << CSW_FLASHBANG << CSW_C4

new g_iMaxPlayers

new bool:g_weaponMortalHeadshotMAX_WEAPONS ]

public 
plugin_init() 
{
    
register_plugin"Mortal Headshot""0.1.1""eXtrem" )
    
    
register_concmd"mh_weapon""ConsoleCommand_MortalHeadshot"ADMIN_KICK )
    
    
RegisterHamHam_TraceAttack"player""HamTraceAttack" )
    
    
g_iMaxPlayers get_maxplayers()
}

public 
HamTraceAttackvictimattackerFloat:damageFloat:tr[3], traceresultdmgbits )
{
    if( !
IsPlayerattacker ) || victim == attacker )
        return 
HAM_IGNORED
    
    
if( g_weaponMortalHeadshotget_user_weaponattacker ) ] && get_tr2traceresult TR_iHitgroup ) == HIT_HEAD )
    {
        
SetHamParamFloatdamage 10.0 )
    }
    
    return 
HAM_IGNORED
}

public 
ConsoleCommand_MortalHeadshotidlevelcid )
{
    if( !
cmd_accessidlevelcid)  ) 
    { 
        return 
PLUGIN_HANDLED
    

    
    new 
szWeapon32 ] = "weapon_"
        
    
read_argv1szWeapon], charsmaxszWeapon ) -)
    
    new 
weaponid get_weaponidszWeapon )
        
    if( 
weaponid && ~( << weaponid ) & bitsNotAllowedWeapons )
    {
        new 
szValue]
        
read_argv2szValuecharsmaxszValue ) )
        
        
g_weaponMortalHeadshotweaponid ] = szValue] == '0' false true            
                
        console_print
id"%s mortal headshot : %s"szWeaponszValue] == '0' "disabled" "enabled" )
    }
    
    return 
PLUGIN_HANDLED



MAJESTIC_SZ 08-24-2022 07:05

Re: Mortal Headshot v0.1.1
 
Quote:

Originally Posted by bibu (Post 2786561)
Try this:

PHP Code:

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

#define IsPlayer(%1) (1<= %1 <= g_iMaxPlayers)
#define MAX_WEAPONS CSW_P90

const bitsNotAllowedWeapons << CSW_SMOKEGRENADE << CSW_HEGRENADE << CSW_FLASHBANG << CSW_C4

new g_iMaxPlayers

new bool:g_weaponMortalHeadshotMAX_WEAPONS ]

public 
plugin_init() 
{
    
register_plugin"Mortal Headshot""0.1.1""eXtrem" )
    
    
register_concmd"mh_weapon""ConsoleCommand_MortalHeadshot"ADMIN_KICK )
    
    
RegisterHamHam_TraceAttack"player""HamTraceAttack" )
    
    
g_iMaxPlayers get_maxplayers()
}

public 
HamTraceAttackvictimattackerFloat:damageFloat:tr[3], traceresultdmgbits )
{
    if( !
IsPlayerattacker ) || victim == attacker )
        return 
HAM_IGNORED
    
    
if( g_weaponMortalHeadshotget_user_weaponattacker ) ] && get_tr2traceresult TR_iHitgroup ) == HIT_HEAD )
    {
        
SetHamParamFloatdamage 10.0 )
    }
    
    return 
HAM_IGNORED
}

public 
ConsoleCommand_MortalHeadshotidlevelcid )
{
    if( !
cmd_accessidlevelcid)  ) 
    { 
        return 
PLUGIN_HANDLED
    

    
    new 
szWeapon32 ] = "weapon_"
        
    
read_argv1szWeapon], charsmaxszWeapon ) -)
    
    new 
weaponid get_weaponidszWeapon )
        
    if( 
weaponid && ~( << weaponid ) & bitsNotAllowedWeapons )
    {
        new 
szValue]
        
read_argv2szValuecharsmaxszValue ) )
        
        
g_weaponMortalHeadshotweaponid ] = szValue] == '0' false true            
                
        console_print
id"%s mortal headshot : %s"szWeaponszValue] == '0' "disabled" "enabled" )
    }
    
    return 
PLUGIN_HANDLED




Thank you very much. I have been testing it and so far so good :wink:

bibu 08-24-2022 08:01

Re: Mortal Headshot v0.1.1
 
To plugin approvers, the problem is in the line
Quote:

set_pev( victim, pev_health , 1 )
I simply changed the damage param to a high value, to make it a guaranteed kill.


All times are GMT -4. The time now is 18:30.

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