Raised This Month: $ Target: $400
 0% 

[SOLVED]amx_showip / listplayers


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-28-2015 , 20:48   Re: [REQ]amx_showip / listplayers
Reply With Quote #11

If you just need the userid, just use status. If for some reason that is not enough for you, you can add it to the code with get_user_userid(id) and adding it to the console print. This can easily be done by replacing the "id" in the client_print() with get_user_userid(id) (assuming you don't want the entity id).
__________________
fysiks is offline
Kz1.0
Senior Member
Join Date: Jan 2013
Location: Vietnam
Old 06-29-2015 , 00:48   Re: [REQ]amx_showip / listplayers
Reply With Quote #12

you can compile this if you don't know how to edit.

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

#define PLUGIN "Depresie"
#define VERSION "1.0"
#define AUTHOR "GUG"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("amx_showip""ShowIP"ADMIN_SLAY)
}

public 
ShowIP(adminlevelcid)
{
     if (!
cmd_access(adminlevelcid1))
    return 
PLUGIN_HANDLED
        
    
new Players[32], pnumidszName[33], szIp[24], szSteam[24]
    
get_players(Playerspnum"c")
    
    for (new 
i=0i<pnumi++)
    {
        
id Players[i]
        
get_user_name(idszNamecharsmax(szName))
        
get_user_ip(idszIpcharsmax(szIp))
        
get_user_authid(idszSteamcharsmax(szSteam))
        
id get_user_userid(id)
        
        
console_print(admin"#%i %s %s %s"idszNameszIpszSteam)
    }
    
    return 
PLUGIN_HANDLED_MAIN

Kz1.0 is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 06-29-2015 , 05:03   Re: [REQ]amx_showip / listplayers
Reply With Quote #13

oh, thank you guys you the real mvp
Depresie 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 06:15.


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