Raised This Month: $12 Target: $400
 3% 

Mortal Headshot v0.1.1


Post New Thread Reply   
 
Thread Tools Display Modes
MAJESTIC_SZ
Senior Member
Join Date: Mar 2020
Location: Portugal
Old 03-24-2021 , 21:55   Re: Mortal Headshot v0.1.1
Reply With Quote #31

Hello?
MAJESTIC_SZ is offline
MAJESTIC_SZ
Senior Member
Join Date: Mar 2020
Location: Portugal
Old 04-02-2021 , 16:30   Re: Mortal Headshot v0.1.1
Reply With Quote #32

hello ?
MAJESTIC_SZ is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-03-2021 , 18:41   Re: Mortal Headshot v0.1.1
Reply With Quote #33

I'm sorry, i'm quite inactive at the moment, maybe someone else is interested in helping you.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
MAJESTIC_SZ
Senior Member
Join Date: Mar 2020
Location: Portugal
Old 08-15-2022 , 13:10   Re: Mortal Headshot v0.1.1
Reply With Quote #34

Hello
MAJESTIC_SZ is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 08-16-2022 , 03:31   Re: Mortal Headshot v0.1.1
Reply With Quote #35

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

__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.

Last edited by bibu; 08-16-2022 at 04:08.
bibu is offline
MAJESTIC_SZ
Senior Member
Join Date: Mar 2020
Location: Portugal
Old 08-24-2022 , 07:05   Re: Mortal Headshot v0.1.1
Reply With Quote #36

Quote:
Originally Posted by bibu View Post
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

Last edited by MAJESTIC_SZ; 08-24-2022 at 07:05.
MAJESTIC_SZ is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 08-24-2022 , 08:01   Re: Mortal Headshot v0.1.1
Reply With Quote #37

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.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Reply


Thread Tools
Display Modes

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 17:56.


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