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

amx_IP (Determine Player's IP)


Post New Thread Reply   
 
Thread Tools Display Modes
CrawDad
Junior Member
Join Date: Nov 2009
Old 05-06-2010 , 23:11   Re: amx_IP (Determine Player's IP)
Reply With Quote #21

Okay
This is a great idea. But may I suggest that EVERY players name IP be "SAVED" in a DAILY FILE named by date. This way the IPs can be grabbed later as necessary for punishment.

Even better their IP & ID at the same time...

EX: IPFILE 100506


Thanx,

Kilt/CrawDad
CrawDad is offline
`666
AlliedModders Donor
Join Date: Jan 2006
Old 05-07-2010 , 15:13   Re: amx_IP (Determine Player's IP)
Reply With Quote #22

cs* logs do that already
`666 is offline
Kabuto
Senior Member
Join Date: Apr 2009
Location: Lithuania
Old 08-20-2010 , 13:52   Re: amx_IP (Determine Player's IP)
Reply With Quote #23

Hey, can you make without admin. but i did deleted ADMIN_KICK, error
Kabuto is offline
Send a message via Skype™ to Kabuto
`666
AlliedModders Donor
Join Date: Jan 2006
Old 08-21-2010 , 02:53   Re: amx_IP (Determine Player's IP)
Reply With Quote #24

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

/*Description: This plugin enables an admin to find out a player's ip by 
	typing in amx_ip <name>. The ip prints in console and in the regular game.*/

public plugin_init() 
{ 
    register_plugin("Show IP","1.0","$uicid3"); 
    register_concmd("amx_ip","ShowIP",ADMIN_USER,"< player , @TEAM , *>"); 
} 

public ShowIP(id , level , cid) 
{ 
    if(!cmd_access(id , level , cid , 2)) 
        return PLUGIN_HANDLED; 

    new Arg[36]; 
    new szIP[46] , szName[36]; 
    new Players[32] , pnum; 
    read_argv(1, Arg , 35); 

    if(Arg[0] == '@') 
    { 
        switch( Arg[1] ) 
        { 
            case 'C' , 'c': 
            { 
                console_print(id , "[AMXX] IP print out for CT team"); 
                get_players(Players , pnum , "ce" , "CT"); 
                for(new i = 0; i < pnum; i++) 
                { 
                    get_user_ip(Players[i] , szIP , 45 , 1); 
                    get_user_name(Players[i] , szName , 35);
                    console_print(id , "%d) %s     - %s", (i + 1) , szName , szIP); 
                } 
            } 
            case 'T' , 't': 
            { 
                console_print(id , "[AMXX] IP print out for T team"); 
                get_players(Players , pnum , "ce" , "TERRORIST"); 
                for(new i = 0; i < pnum; i++) 
                { 
                    get_user_ip(Players[i] , szIP , 45 , 1); 
                    get_user_name(Players[i] , szName , 35); 
                    console_print(id , "%d) %s     - %s", (i + 1) , szName , szIP); 
                } 
            } 
        } 
    } 
    else if(equal( Arg , "*")) 
    { 
        get_players( Players , pnum , "c"); 
        console_print(id , "[AMXX] IP print out for all players"); 
        for(new i=0; i < pnum; i++) 
        { 
            get_user_ip(Players[i],szIP , 45 , 1); 
            get_user_name(Players[i] , szName , 35); 
            console_print(id , "%d) %s     - %s", (i + 1), szName , szIP); 
        } 
    } 
    else 
    { 
        new Target = cmd_target(id , Arg , 10); 
        if(!is_user_connected(Target)) 
            return PLUGIN_HANDLED; 
        get_user_ip( Target , szIP , 45 , 1); 
        get_user_name( Target , szName , 35); 
        console_print( id , "[AMXX] %s's IP address : %s", szName , szIP); 
    } 
    return PLUGIN_HANDLED; 
}  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
`666 is offline
Old 11-15-2010, 23:56
Antixianos
This message has been deleted by Antixianos.
zerbbi
Junior Member
Join Date: Aug 2009
Old 11-21-2010 , 08:58   Re: amx_IP (Determine Player's IP)
Reply With Quote #25

i would suggest making a plugin that will write player IP in scoreboard (tab) somewhere under name or etc. And admin IP would be hidden. Please make this
zerbbi is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-21-2010 , 16:44   Re: amx_IP (Determine Player's IP)
Reply With Quote #26

Quote:
Originally Posted by zerbbi View Post
i would suggest making a plugin that will write player IP in scoreboard (tab) somewhere under name or etc. And admin IP would be hidden. Please make this
Not possible unless you change the players name to their IP.
__________________
fysiks is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 04-08-2015 , 09:09   Re: amx_IP (Determine Player's IP)
Reply With Quote #27

How about this general plugin? amx_data instead of amx_ip?
PHP Code:
/*
    AMX Mod X script.

    This plugin is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
    Free Software Foundation; either version 2 of the License, or (at
    your option) any later version. 
    
    This plugin is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this plugin; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/

/* Version Settings */
#define PLUGIN_VERSION "1.0"

/* Includes */
#include < amxmodx >
#include < amxmisc >

#pragma semicolon 1

/* Variables */
new g_MaxPlayers;

/* Plugin Forwards */
public plugin_init()
{
    
register_plugin("AMXX Data"PLUGIN_VERSION"funkyfresh95");
    
    
// Register the command
    
register_concmd("amx_data""ConCmd_ShowData"ADMIN_BAN"< name | @team | * > - Show player Name, IP, and SteamID");
    
    
// Get the MAX players count can be held in the servers
    
g_MaxPlayers get_maxplayers();
}

/* Client Commands */
public ConCmd_ShowData(PlayerIDiLeveliCid)
{
    
// No access?
    
if( !cmd_access(PlayerIDiLeveliCid2) )
        return 
PLUGIN_HANDLED;
    
    
// String arrays to hold player data
    
new szArgument[36], szPlayerIP[16], szPlayerName[32], szAuthID[36], iLoop;
    
read_argv(1szArgumentcharsmax(szArgument));
    
    if( 
szArgument[0] == '@' )
    {
        switch(
szArgument[1])
        {
            
// Counter-Terrorists
            
case 'C''c':
            {
                
console_print(PlayerID"[AMXX] Server will generate the data for the COUNTER-TERRORISTS team");
                for(
iLoop 0iLoop <= g_MaxPlayersiLoop++)
                {
                    
// Not connected?
                    
if( !is_user_connected(iLoop) )
                        continue;
                    
                    
// Not counter-terrorist?
                    
if( get_user_team(iLoop) != )
                        continue;
                    
                    
// Get data
                    
get_user_name(iLoopszPlayerNamecharsmax(szPlayerName));
                    
get_user_ip(iLoopszPlayerIPcharsmax(szPlayerIP));
                    
get_user_authid(iLoopszAuthIDcharsmax(szAuthID));
                    
                    
console_print(PlayerID"%d. Name: %s - IP: %s - SteamID: %s", (iLoop 1), szPlayerNameszPlayerIPszAuthID);
                }
            }
            
            
// Terrorists
            
case 'T''t':
            {
                
console_print(PlayerID"[AMXX] Server will generate the data for the TERRORISTS team");
                for(
iLoop 0iLoop <= g_MaxPlayersiLoop++)
                {
                    
// Not connected?
                    
if( !is_user_connected(iLoop) )
                        continue;
                    
                    
// Not terrorist?
                    
if( get_user_team(iLoop) != )
                        continue;
                    
                    
// Get data
                    
get_user_name(iLoopszPlayerNamecharsmax(szPlayerName));
                    
get_user_ip(iLoopszPlayerIPcharsmax(szPlayerIP));
                    
get_user_authid(iLoopszAuthIDcharsmax(szAuthID));
                    
                    
console_print(PlayerID"%d. Name: %s - IP: %s - SteamID: %s", (iLoop 1), szPlayerNameszPlayerIPszAuthID);
                }
            }
        }
    }
    else if( 
equal(szArgument"*") )
    {
        
console_print(PlayerID"[AMXX] Server will generate the data for the ALL players");
        for(
iLoop 0iLoop <= g_MaxPlayersiLoop++)
        {
            
// Not connected?
            
if( !is_user_connected(iLoop) )
                continue;
            
            
// Get data
            
get_user_name(iLoopszPlayerNamecharsmax(szPlayerName));
            
get_user_ip(iLoopszPlayerIPcharsmax(szPlayerIP));
            
get_user_authid(iLoopszAuthIDcharsmax(szAuthID));
            
            
console_print(PlayerID"%d. Name: %s - IP: %s - SteamID: %s", (iLoop 1), szPlayerNameszPlayerIPszAuthID);
        }
    }
    else
    {
        new 
TargetID cmd_target(PlayerIDszArgument2);
        
        
// Invalid target
        
if( !TargetID )
        {
            
console_print(PlayerID"(!) Invalid target id (%d)"TargetID);
            return 
PLUGIN_HANDLED;            
        }
        
        
// Get data
        
get_user_name(TargetIDszPlayerNamecharsmax(szPlayerName));
        
get_user_ip(TargetIDszPlayerIPcharsmax(szPlayerIP));
        
get_user_authid(TargetIDszAuthIDcharsmax(szAuthID));
        
        
console_print(PlayerID"Name: %s - IP: %s - SteamID: %s"szPlayerNameszPlayerIPszAuthID);
    }
    
    
// Get admin data
    
new szAdminName[32], szAdminAuthID[36];
    
get_user_name(PlayerIDszAdminNamecharsmax(szAdminName));
    
get_user_authid(PlayerIDszAdminAuthIDcharsmax(szAdminAuthID));
    
    
// Log data to the server for some security reasons!
    
log_amx("Admin %s (SteamID: %s) Used the AMXX Data Command."szAdminNameszAdminAuthID);
    
    return 
PLUGIN_HANDLED;

__________________
Discord contacts:
I rarely look at private messages here, but I am very active on Discord!
happy_2012 is offline
maxd
Junior Member
Join Date: Apr 2012
Old 04-29-2015 , 12:03   Re: amx_IP (Determine Player's IP)
Reply With Quote #28

Hello. Can anybody modify this amx_ip plugin (#16) so that all player list shows by inputting only amx_ip command without giving "*" wildcard? All other functionality can remain the same.
Edit: I assume that desired result can be achieved by modifying line 53. No idea what to do with it. Simply deleting asterix symbol there does not work.

Last edited by maxd; 04-29-2015 at 13:12.
maxd is offline
ViBE
Member
Join Date: Jul 2011
Location: Somewhere over the...
Old 11-29-2015 , 15:46   Re: amx_IP (Determine Player's IP)
Reply With Quote #29

i don't know where can i suggest this, but showing IP's would be good with amx_who for example. it can be usefull for admins.
ViBE is offline
Send a message via ICQ to ViBE
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-29-2015 , 16:11   Re: amx_IP (Determine Player's IP)
Reply With Quote #30

Quote:
Originally Posted by ViBE View Post
i don't know where can i suggest this, but showing IP's would be good with amx_who for example. it can be usefull for admins.
If you are wanting to change functionality of AMX Mod X, you should create a bug report here. Choose "Enhancement" for the severity.
__________________
fysiks 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 00:01.


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