Jump to content
GIGN Forum

Amx_list


Recommended Posts

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "show IP"
#define VERSION "1.0"
#define AUTHOR "remix.cc"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_concmd("amx_ip", "cmdip")

    // Add your code here...
}


public cmdip(id, level, cid)
{

    new players[32], inum, cl_on_server[64], ip[32], name[32]

    

    
    get_players(players, inum)
    format(cl_on_server, 63, "%L", id, "CLIENTS_ON_SERVER")
    console_print(id, "^n%s:^n #  %-16.15s %-20s", cl_on_server, "nick", "ip", "userid")
    
    for (new a = 0; a < inum; ++a)
    {
        get_user_ip(players[a], ip, 31)
        get_user_name(players[a], name, 31)


        console_print(id, "%2d  %-16.15s %-20s", players[a], name, ip)
    }
    
    console_print(id, "%L", id, "TOTAL_NUM", inum)
    get_user_ip(id, ip, 31)
    get_user_name(id, name, 31)
    log_amx("Cmd: ^"%s<%d><%s><>^" ask for players list", name, get_user_userid(id), ip) 
    
    return PLUGIN_HANDLED
}

palaist var uzpiezot konsole:

amx_ip

Edited by remix.cc
Link to comment
Share on other sites

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "show IP"
#define VERSION "1.0"
#define AUTHOR "remix.cc"
public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_concmd("amx_ip", "cmdip")

    // Add your code here...
}
public cmdip(id, level, cid)
{

    new players[32], inum, cl_on_server[64], ip[32], name[32]

    

    
    get_players(players, inum)
    format(cl_on_server, 63, "%L", id, "CLIENTS_ON_SERVER")
    console_print(id, "^n%s:^n #  %-16.15s %-20s", cl_on_server, "nick", "ip", "userid")
    
    for (new a = 0; a < inum; ++a)
    {
        get_user_ip(players[a], ip, 31)
        get_user_name(players[a], name, 31)
        console_print(id, "%2d  %-16.15s %-20s", players[a], name, ip)
    }
    
    console_print(id, "%L", id, "TOTAL_NUM", inum)
    get_user_ip(id, ip, 31)
    get_user_name(id, name, 31)
    log_amx("Cmd: ^"%s<%d><%s><>^" ask for players list", name, get_user_userid(id), ip) 
    
    return PLUGIN_HANDLED
}

palaist var uzpiezot konsole:

amx_ip

Uzkodeeji vai atradi sheit?

Link to comment
Share on other sites

Juuu kods totali nokopets.. idiots... teicu, ka panemu amx_who komandu UN PARVEIDOJU... auns... totals..

/* 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_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(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] , szIP , 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] , szIP , 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 }
*/

nu ja.. kods totali sakriit.. 99%... bet tev laikam redze ir slikta.. tapec piedodu... ;)

Edited by remix.cc
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...