Thread: About me
View Single Post
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-15-2009 , 14:31   Re: About me
Reply With Quote #5

If player is dead, ofcourse his health & armor is 0, you should add alive check

PHP Code:
#include <amxmodx>

#define PLUGIN    "Aboutme"
#define VERSION    "1.0"
#define AUTHOR    "xer'"

public plugin_init() {
    
register_pluginPLUGINVERSIONAUTHOR );
       
register_clcmd("say /aboutme""cmdAboutMe");
       
register_clcmd("say_team /aboutme""cmdAboutMe");
    
set_task30.0"fnInformation"___"b" );
}

public 
cmdAboutMeid ) {
    new 
szName32 ], szIp16 ], szSteamID32 ], iPingiLoss;
    
get_user_nameidszName31 );
    
get_user_ipidszIp31);
    
get_user_authididszSteamID31 );
    
get_user_pingidiPingiLoss );
    
    
client_printidprint_chat"* Your name is %s. Your ip is: %s. Your steamid is: %s"szNameszIpszSteamID );
    
    if( 
is_user_aliveid ) )
        
client_printidprint_chat"* Your Health: %d. Your armor: %d. Your Frags: %d. Your deaths: %d. Your ping: %d"get_user_healthid ), get_user_armorid ), get_user_fragsid ), get_user_deathsid ), iPing );
    else
        
client_printidprint_chat"* Your Frags: %d. Your deaths: %d. Your ping: %d"get_user_fragsid ), get_user_deathsid ), iPing );
    
    return 
PLUGIN_HANDLED;
}

public 
fnInformation() {
    
client_print0print_chat"To see live data about you, type in chat /aboutme" );

__________________
xPaw is offline