Raised This Month: $ Target: $400
 0% 

Simple Knife plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rigved
Junior Member
Join Date: Dec 2016
Old 05-17-2017 , 03:06   Simple Knife plugin
Reply With Quote #1

Can someone make simple knife plugin which will show HUD message on knife kill with 1 default sound.
Hud message with dhud function.

like this with dhud:

Player knifed Noob !

at same time 1 sound will be played.
Attached Files
File Type: inc dhudmessage.inc (3.4 KB, 95 views)
Rigved is offline
SXJ Team.
Junior Member
Join Date: Jun 2014
Old 05-17-2017 , 06:29   Re: Simple Knife plugin
Reply With Quote #2

PHP Code:
#include < amxmodx >
#include < dhudmessage >

public plugin_init( ) {
    
    
register_event"DeathMsg""eDeathMsg""a" );
}
public 
eDeathMsg( ) {
    
    new 
iKiller read_data);
    new 
iVictim read_data);
    
    new 
szWeaponName20 ];
    
    
read_data4szWeaponNamecharsmaxszWeaponName ) );
    
    new 
szKillerName32 ], szVictimName32 ];
    
    
get_user_nameiKillerszKillerNamecharsmaxszKillerName ) );
    
get_user_nameiVictimszVictimNamecharsmaxszVictimName ) );
    
    if( 
is_user_aliveiKiller ) && equalszWeaponName"knife" ) )
    {
        
set_dhudmessage(255255255, -1.00.2010.011.00.010.01)
        
show_dhudmessage0"%s knifed %s!"szKillerNameszVictimName );
        
        
client_cmdiKiller"speak <sound name for killer>" );
        
client_cmdiVictim"speak <sound name for victim>" );
    }


Last edited by SXJ Team.; 05-17-2017 at 06:31.
SXJ Team. 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 20:47.


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