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

weapon name message on kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 04-11-2020 , 18:16   weapon name message on kill
Reply With Quote #1

could someone help me with this?
I want (like in csgo) when killing someone to show a message on chat like "You killed blabla with a AK-47" and here depends to what weapon do you use.. thanks
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-11-2020 , 18:32   Re: weapon name message on kill
Reply With Quote #2

PHP Code:

#include <amxmodx>

public plugin_init() 
{
    
register_event"DeathMsg" "DeathMsg" "a" "1>0" );
}

public 
DeathMsg()
{
    new 
iKiller read_data);
    new 
iVictim read_data);
    new 
szWeapon20 ];
    new 
szVictimName32 ] , szKillerName32 ];

    if ( 
iVictim != iKiller )
    {
        
read_dataszWeapon charsmaxszWeapon ) );

        
get_user_nameiKiller szKillerName charsmaxszKillerName ) );
        
get_user_nameiVictim szVictimName charsmaxszVictimName ) );
        
        
client_printprint_chat "* %s killed %s with %s%s" szKillerName szVictimName szWeapon read_data) ? ", via headshot!" "" );
    }

__________________
Bugsy is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 04-12-2020 , 16:47   Re: weapon name message on kill
Reply With Quote #3

thank you, i will come with a feedback once i test it, but it must work
__________________
a simple act of caring creates an endless ripple.
Nutu_ 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:02.


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