Raised This Month: $ Target: $400
 0% 

client_death


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-25-2010 , 09:52   Re: client_death
Reply With Quote #3

That function gets passed all integers, no strings. If you are expecting player names for killer\victim, you will need to use get_user_name with killer\victim as player id (check first if they are players by (1<=id<=maxplayers)).
PHP Code:
public client_death(killervictimwpnindexhitplaceTK)
{
    
/* from amxconst.inc
    #define HIT_GENERIC        0
    #define HIT_HEAD        1
    #define HIT_CHEST        2
    #define HIT_STOMACH        3
    #define HIT_LEFTARM        4
    #define HIT_RIGHTARM        5
    #define HIT_LEFTLEG        6
    #define HIT_RIGHTLEG        7 */
    
    
new const HitPlaceStrings[][] = 
    {
        
"Generic",
        
"Head",
        
"Chest",
        
"Stomach",
        
"LeftArm",
        
"RightArm",
        
"LeftLeg",
        
"RightLeg"
    
};

    
msg("Kill Status: Killer: %d / Victim: %d / Weapon: %d / Hitplace: %s / TK: %d / HeadShot %s",killervictimwpnindexHitPlaceStringshitplace ] , TK, ( hitplace == HIT_HEAD ) : "yes" "no" );

__________________

Last edited by Bugsy; 11-25-2010 at 09:55.
Bugsy is offline
 



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 11:24.


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