Raised This Month: $32 Target: $400
 8% 

Double Kill! Hud Message!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FN_Productions
Member
Join Date: Mar 2014
Old 09-11-2014 , 16:49   Double Kill! Hud Message!
Reply With Quote #1

Hey guys i was just wondering if its possible someone could make a small plugin where if you get a double kill it will show a hud message saying Double Kill! if you also get a double kill with a grenade i want it to show a hud message saying Double Kill! i run a CSDM server so this would be really cool if someone could make plugin if someone gets double kill with weapon or grenade.

Now possibly able to make it so that lets say you kill 2 players fast then the message would show up Double Kill i do not want it where you get 1 kill then 30 second later you get another kill it say Double Kill no i want it where if you kill 2 players right there fast then it will show up Double Kill.
FN_Productions is offline
Send a message via Skype™ to FN_Productions
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 09-11-2014 , 17:33   Re: Double Kill! Hud Message!
Reply With Quote #2

All credits go to that guy from here - https://forums.alliedmods.net/showpo...58&postcount=4
It will also show the HUD message if he makes triple, quadra or penta kill
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <hamsandwich>
#include <fakemeta>

#define VERSION "1.0"

new g_iMaxPlayers
#define FIRST_PLAYER_ID 1
#define IsPlayer(%1) ( FIRST_PLAYER_ID <= %1 <= g_iMaxPlayers )

#define GetBit(%1,%2)       ( %1 &   1 << ( %2 & 31 ) )
#define SetBit(%1,%2)       ( %1 |=  ( 1 << ( %2 & 31 ) ) )
#define DelBit(%1,%2)       ( %1 &= ~( 1 << ( %2 & 31 ) ) )

const MAX_PLAYERS 32

new is_Aliveis_ConnectediKillerShot
new g_iGunEvent_IDsBitsumg_fwid
new g_iShotKillsMAX_PLAYERS ]

//Cvar
new g_pCvar_Enabled

new const g_iGunEvents[][] = {
    
"events/awp.sc",
    
"events/g3sg1.sc",
    
"events/ak47.sc",
    
"events/scout.sc",
    
"events/m249.sc",
    
"events/m4a1.sc",
    
"events/sg552.sc",
    
"events/aug.sc",
    
"events/sg550.sc",
    
"events/m3.sc",
    
"events/xm1014.sc",
    
"events/usp.sc",
    
"events/mac10.sc",
    
"events/ump45.sc",
    
"events/fiveseven.sc",
    
"events/p90.sc",
    
"events/deagle.sc",
    
"events/p228.sc",
    
"events/glock18.sc",
    
"events/mp5n.sc",
    
"events/tmp.sc",
    
"events/elite_left.sc",
    
"events/elite_right.sc",
    
"events/galil.sc",
    
"events/famas.sc"
}

new const 
g_szKillNames[][] =
{
    
"Double",
    
"Triple",
    
"Quadra",
    
"Penta"
}

public 
plugin_init() {
    
register_plugin"Bullet Kill"VERSION"Pastout!" )
    
    
g_pCvar_Enabled register_cvar("bulletkill_enable""1")// 1 = on || 0 = off
    
if ( !get_pcvar_numg_pCvar_Enabled ) )
        return;
    
    
g_iMaxPlayers get_maxplayers( )
    
    new 
g_szPlayer[] = "player"
    
RegisterHamHam_Spawng_szPlayer"Ham_CBasePlayer_Spawn", .Post true )
    
RegisterHamHam_Killedg_szPlayer"Ham_CBasePlayer_Killed", .Post true )
    
RegisterHamHam_TraceAttackg_szPlayer"Ham_CBasePlayer_TraceAttack", .Post false )
    
    
unregister_forwardFM_PrecacheEventg_fwid)
    
register_forwardFM_PlaybackEvent"Fwd_Playback_Event" )
}

public 
plugin_unpause() {
    
is_Connected 0;
    
is_Alive 0;
    static 
iPlayers32 ], iNumiPlayer
    get_players
iPlayersiNum"ch" )
    
    for( new 
0iNumi++ ) 
    {
        
iPlayer iPlayers]
        
SetBitis_ConnectediPlayer 
        if( 
is_user_aliveiPlayer ) )
        {
            
SetBitis_AliveiPlayer )
        }
    }
}

public 
plugin_precache()
    
g_fwid register_forwardFM_PrecacheEvent"Fwd_Precache_Event")

public 
Fwd_Precache_Eventtype, const name[] ) {
    for( new 
0sizeof g_iGunEvents; ++) {
        if( 
equalg_iGunEvents], name ) ) {
            
g_iGunEvent_IDsBitsum |= ( << get_orig_retval() )
            return 
FMRES_HANDLED
        
}
    }
    return 
FMRES_IGNORED
}

public 
Fwd_Playback_Eventflagsideventid ) {
    if( !( 
g_iGunEvent_IDsBitsum & ( << eventid ) ) || !IsPlayerid ) )
        return 
FMRES_IGNORED;
    
    
DelBitiKillerShotid )
    
g_iShotKillsid ] = 0
    
return FMRES_HANDLED
}

public 
Ham_CBasePlayer_TraceAttackthisiAttackerFloat:damageFloat:direction], traceresultdamagebits ) {
    if( 
GetBitis_ConnectediAttacker ) && GetBitis_AliveiAttacker ) )
    {
        static 
g_iWeapong_iWeapon get_user_weaponiAttacker )
        if( 
g_iWeapon == CSW_KNIFE || g_iWeapon == CSW_HEGRENADE )
        {
            return 
HAM_HANDLED
        
}
        
        
SetBitiKillerShotiAttacker )
        
    }
    return 
HAM_HANDLED
}

public 
Ham_CBasePlayer_KillediVictimiKiller ) {
    if( 
GetBitis_AliveiKiller 
    && 
GetBitis_ConnectediVictim 
    && 
GetBitiKillerShotiKiller ) )
    {
        
g_iShotKillsiKiller ]++
        if( 
g_iShotKillsiKiller ] >= )
        {
            new 
szName32 ]
            
get_user_nameiKillerszNamecharsmaxszName ) );
            
            
set_hudmessage(25500, -1.0, -1.000.012.00.00.0, -1)
            
show_hudmessage(0"%s Made %s Kill!"szNameg_szKillNames[g_iShotKills[iKiller]])
            
            
g_iShotKillsiKiller ] = 
        
}
    }
}

public 
Ham_CBasePlayer_Spawnid ) {
    if( !
is_user_aliveid ) )
        return 
HAM_IGNORED;
    
    
SetBitis_Aliveid )
    
    return 
HAM_IGNORED;
}

public 
client_putinserverid ) {
    
SetBitis_Connectedid );
    
DelBitis_Aliveid );
}

public 
client_disconnectid ) {
    
DelBitis_Connectedid );
    
DelBitis_Aliveid );

__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-11-2014 , 20:57   Re: Double Kill! Hud Message!
Reply With Quote #3

You can try this also: https://forums.alliedmods.net/showpo...67&postcount=4

If you want to see the video: https://www.youtube.com/watch?v=ArJK0i1KlbA

Last edited by zmd94; 09-12-2014 at 09:55.
zmd94 is offline
FN_Productions
Member
Join Date: Mar 2014
Old 09-12-2014 , 09:49   Re: Double Kill! Hud Message!
Reply With Quote #4

I did actually try your plugin you requested with the combo_sprites this plugin is literally perfect there is only 1 problem im hoping you or someone may know how to make or edit. basically in this plugin when you kill someone it will show combo 1,2,3 above their head. i like that but there is problem you can see your teammates and enemy combo above there head also so if they get kills you can see there combo sprite above there head and i was hoping if you could edit it so only the player that is making the combo can only see his own combo and no one else

https://forums.alliedmods.net/showpo...67&postcount=4

Last edited by FN_Productions; 09-12-2014 at 09:49.
FN_Productions is offline
Send a message via Skype™ to FN_Productions
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-12-2014 , 09:59   Re: Double Kill! Hud Message!
Reply With Quote #5

Sorry FN_Productions, I'm not sure how to do it.
zmd94 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:14.


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