Cerere plugin showip.

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
MHz&3viL
Membru, skill +1
Membru, skill +1
Posts: 184
Joined: 26 Nov 2007, 21:41
Detinator Steam: Da
CS Status: EviL ZonE
Detinator server CS: cs.evilz.ro
SteamID: mhz_evilz
Location: Satu Mare
Has thanked: 1 time
Been thanked: 13 times

23 Aug 2010, 22:33

Cred ca peste 20 de scripturi showip m-am uitat si testat, dar nici unu nu functioneaza asa cum doresc. As dori un plugin care la comanda amx_showip sa afiseze toate ip-urile in afara de admini. Comanda poate fi executata doar de admin. Fara ca pluginul sa contine comanda amx_ipban sau sa creeze un motd cu ip-uri. Tot am incercat sa creez singur sau sa modific dar fara succes. Nu conteaza daca are alte functii, doar scriptul sa functioneze asa cum am scris mai sus.
Reptile
Membru, skill +1
Membru, skill +1
Posts: 245
Joined: 12 Nov 2008, 14:11
Detinator Steam: Nu
Reputatie: Fost manager
Been thanked: 23 times

24 Aug 2010, 06:49

Code: Select all

#include <amxmodx>
#include <amxmisc>

#pragma semicolon 1

new const g_version[] = "0.1";

public plugin_init()
{
    register_plugin( "ShowIP", g_version, "compaq" );
    register_concmd( "amx_showip", "cmdShow", ADMIN_SLAY, "afiseaza IP-urile jucatorilor" );
}

public cmdShow( i_Index, iLevel, iCid )
{
    if( !cmd_access( i_Index, iLevel, iCid, 0 ) )
        return 1;

    
    for( new i = 0; i < get_maxplayers(); i++ )
    {
        static szName[ 33 ], szIp[ 33 ];
        get_user_name( i, szName, charsmax( szName ) );
        get_user_ip( i, szIp, charsmax( szIp ) );

        if( get_user_flags( i ) == read_flags( "z" ) )
        {
            client_print( i_Index, print_console, "Name - IP" );
            client_print( i_Index, print_console, "%s - %s", szName, szIp );
        }

        else
        {
            return 1;
        }
    }

    return 0;
}
Last edited by Reptile on 24 Aug 2010, 12:41, edited 1 time in total.
User avatar
MHz&3viL
Membru, skill +1
Membru, skill +1
Posts: 184
Joined: 26 Nov 2007, 21:41
Detinator Steam: Da
CS Status: EviL ZonE
Detinator server CS: cs.evilz.ro
SteamID: mhz_evilz
Location: Satu Mare
Has thanked: 1 time
Been thanked: 13 times

24 Aug 2010, 12:36

] amx_showip
Usage: amx_showip afiseaza IP-urile jucatoril

nu merge :(
Reptile
Membru, skill +1
Membru, skill +1
Posts: 245
Joined: 12 Nov 2008, 14:11
Detinator Steam: Nu
Reputatie: Fost manager
Been thanked: 23 times

24 Aug 2010, 12:41

My mistake. Am editat.
User avatar
MHz&3viL
Membru, skill +1
Membru, skill +1
Posts: 184
Joined: 26 Nov 2007, 21:41
Detinator Steam: Da
CS Status: EviL ZonE
Detinator server CS: cs.evilz.ro
SteamID: mhz_evilz
Location: Satu Mare
Has thanked: 1 time
Been thanked: 13 times

24 Aug 2010, 13:27

Daca nu ai flagul slay, nu iti da acces la comanda. -> works
Nu afiseaza nici o lista cu IP-uri si Numele jucatorilor.
Deci concluzia ca nu functioneaza. Am incercat sa fac si eu unul cu cvar, nu afiseaza ip-urile adminilor dar problema este ca afiseaza la toata lumea comanda.

Code: Select all

#include <amxmodx>
#include <amxmisc>

new gPcvar;

public plugin_init() {
	register_plugin("AmX ShowIP","1.2","Mai multi autori")

	register_clcmd("amx_showip", "cmdShowIp", ADMIN_RESERVATION);
	
	gPcvar = register_cvar("amx_showip_admins", "1");

	return PLUGIN_CONTINUE
	
}

public cmdShowIp( id, lvl, cid) 
{ 
	if ( !cmd_access( id, lvl, cid, 1 ) ) return PLUGIN_HANDLED
	console_print(id, "Nume jucator - IP");
	console_print(id, "---------------------------");
	
	new players[32], num;
	get_players(players, num);
	
	for(new i = 0 ; i < num ; i++) 
	{ 
		new name[32] ; 
		new ipeki[32];
		get_user_name(players[i], name, 31)
		get_user_ip(players[i], ipeki, 31, 1);
		
		if(is_user_admin(players[i]) && !get_pcvar_num(gPcvar))
			console_print(id, "%s", name);
		else
			console_print(id, "%s  -  %s", name, ipeki);
	}
	console_print(id, "----------------------------");
	
	return 1;
}
User avatar
Ciprian
Fost administrator
Fost administrator
Posts: 5172
Joined: 10 May 2008, 20:29
Detinator Steam: Da
CS Status: ^^
SteamID: crazycipry
Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
Location: Baia Mare
Has thanked: 176 times
Been thanked: 401 times

28 Aug 2010, 16:02

| Afiseaza codul
[code=php]#include <amxmodx>
#include <amxmisc>

new gPcvar;

public plugin_init() {
    
    register_plugin("Show IP Advanced", "0.2", "eXtreamCS Team") 
    
    register_clcmd("amx_showip", "cmdShowIp", -1);
    
    gPcvar = register_cvar("amx_showip_admins", "1");
} 

public cmdShowIp(id) 
{ 
    console_print(id, "Nume jucator - IP");
    console_print(id, "---------------------------");
    
    new players[32], num;
    get_players(players, num);
    
    for(new i = 0 ; i < num ; i++) 
    { 
        new name[32] ; 
        new ipeki[32];
        get_user_name(players, name, 31)
        get_user_ip(players, ipeki, 31, 1);
        
        if(is_user_admin(players) && !get_pcvar_num(gPcvar))
            console_print(id, "%s", name);
        else
            console_print(id, "%s  -  %s", name, ipeki);
    }
    console_print(id, "---------------------------");
    
    return 1;
} [/code]

cu cvarul

Code: Select all

amx_showip_admins 0
Post Reply

Return to “Cereri”

  • Information