Raised This Month: $95 Target: $400
 23% 

amx_IP (Determine Player's IP)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Xanimos (85)
Jordan
Veteran Member
Join Date: Aug 2005
Old 08-25-2006 , 00:32   amx_IP (Determine Player's IP)
Reply With Quote #1

[b]Description[b]
This plugin enables an admin to find out a player's ip by typing in amx_ip <name>. The ip prints in the console.

Version
1.0

Commands
amx_ip <name>

Acknowledgments
Suicid3, as this is his coding.

To Come:
Tomorrow I'll make the IP print out in game too.

Enjoy
Attached Files
File Type: sma Get Plugin or Get Source (amx_ip.sma - 23800 views - 2.6 KB)

Last edited by Xanimos; 08-27-2006 at 14:54.
Jordan is offline
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 08-25-2006 , 02:07   Re: amx_IP (Determine Player's IP)
Reply With Quote #2

how about a menu or motd gets players names and their ips?
k007 is offline
Send a message via MSN to k007
Jordan
Veteran Member
Join Date: Aug 2005
Old 08-25-2006 , 02:11   Re: amx_IP (Determine Player's IP)
Reply With Quote #3

I was thinking about that but it seemed too similar to another plugin I saw, one kind of like amx_who o.o
Jordan is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-25-2006 , 08:58   Re: amx_IP (Determine Player's IP)
Reply With Quote #4

I made this before...it was in suggestions/requests forum.

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

public plugin_init()
{
    
register_plugin("Show IP","1.0","$uicid3");
    
register_concmd("amx_ip","ShowIP",ADMIN_KICK,"< 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(1Arg 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 
0pnumi++)
                {
                    
get_user_ip(Players[i] , szIP 45 1);
                    
get_user_name(Players[i] , szIP 35);
                    
console_print(id "%d) %s     - %s", (1) , szName szIP);
                }
            }
            case 
'T' 't':
            {
                
console_print(id "[AMXX] IP print out for T team");
                
get_players(Players pnum "ce" "TERRORIST");
                for(new 
0pnumi++)
                {
                    
get_user_ip(Players[i] , szIP 45 1);
                    
get_user_name(Players[i] , szIP 35);
                    
console_print(id "%d) %s     - %s", (1) , szName szIP);
                }
            }
        }
    }
    else if(
equalArg "*"))
    {
        
get_playersPlayers pnum "c");
        
console_print(id "[AMXX] IP print out for all players");
        for(new 
i=0pnumi++)
        {
            
get_user_ip(Players[i],szIP 45 1);
            
get_user_name(Players[i] , szName 35);
            
console_print(id "%d) %s     - %s", (1), szName szIP);
        }
    }
    else
    {
        new 
Target cmd_target(id Arg 10);
        if(!
is_user_connected(Target))
            return 
PLUGIN_HANDLED;
        
get_user_ipTarget szIP 45 1);
        
get_user_nameTarget szName 35);
        
console_printid "[AMXX] %s's IP address : %s"szName szIP);
    }
    return 
PLUGIN_HANDLED;

I'll allow you to use the code in your plugin and I'll even approve it. Just give credit where credit is due...Since I made this my name stays as the author.

Last edited by Xanimos; 08-27-2006 at 14:53.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Jordan
Veteran Member
Join Date: Aug 2005
Old 08-25-2006 , 13:04   Re: amx_IP (Determine Player's IP)
Reply With Quote #5

Sorry, didn't know you made it ^^ credit added.
Jordan is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-26-2006 , 01:39   Re: amx_IP (Determine Player's IP)
Reply With Quote #6

Not quite what I meant.

I meant if you use my code credit me not just credit me when you never used my code.

[EDIT] BTW, your code will have run time errors. You neglect to check if the target is actually a real target.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Jordan
Veteran Member
Join Date: Aug 2005
Old 08-26-2006 , 02:05   Re: amx_IP (Determine Player's IP)
Reply With Quote #7

Ah. Got it. Thanks suicid3
Jordan is offline
FreaKy_FlaSh
Junior Member
Join Date: Jul 2006
Old 09-05-2006 , 02:06   Re: amx_IP (Determine Player's IP)
Reply With Quote #8

which is the other plugin.

the menu is something i also want, coz sometimes there are players who have ` or ~ in their nick, so typing tht in console is impossible if console is binded to ` or ~.

so a menu would be much appreciated.

menus are something tht i like most 'bout amx like kick menu by the help of which i can kick any person irrespective of whatever nick they have.

thank u
FreaKy_FlaSh is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-06-2006 , 22:47   Re: amx_IP (Determine Player's IP)
Reply With Quote #9

in any plugin that you supply a person by name you don't need to type their whole name. Only a unique portion of their name.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 09-07-2006 , 00:43   Re: amx_IP (Determine Player's IP)
Reply With Quote #10

But what if their name is ` ?
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
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 02:11.


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