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

Solved How to know this?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 04-16-2021 , 02:45   How to know this?
Reply With Quote #1

Hello, is there method to know the player who kill you before? i.e. Player who kill you: James bond

Also i want to know the weapon used after he killed me.

That's all thanks.
__________________

Last edited by nG_getwreck; 04-16-2021 at 04:51.
nG_getwreck is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 04-16-2021 , 04:44   Re: How to know this?
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!" "" );
    }

https://forums.alliedmods.net/showpo...14&postcount=2
__________________
My plugin:

Last edited by Celena Luna; 04-16-2021 at 04:44.
Celena Luna is offline
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 04-16-2021 , 04:52   Re: How to know this?
Reply With Quote #3

Quote:
Originally Posted by Celena Luna View Post
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!" "" );
    }

https://forums.alliedmods.net/showpo...14&postcount=2
Thanks, problem solved.
__________________
nG_getwreck 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 12:11.


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