Raised This Month: $32 Target: $400
 8% 

set admin acces


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
giumbalau
Member
Join Date: Jan 2021
Old 02-21-2021 , 03:36   set admin acces
Reply With Quote #1

Anyone can set admin acces for this command please ?
ADMIN_KICK
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <geoip>

#pragma semicolon 1

new const g_version[] = "1.0";

public 
plugin_init()
{
    
register_plugin"Amx showip"g_version"" );

    
register_concmd"amx_showip""cmdShow");
}

public 
cmdShowi_IndexiLeveliCid )
{
    if( !
cmd_accessi_IndexiLeveliCid) )
    {
        return 
PLUGIN_HANDLED;
    }

    static 
iPlayers32 ], iNumiIndex;
    
get_playersiPlayersiNum"c" );

    
client_printi_Indexprint_console"NAME | IP | COUNTRY" );

    for( 
0iNumi++ )
    {
        
Index iPlayers];

        if( 
is_user_connectedIndex ) )
        {
            static 
szName33 ], Ip33 ], szCountry46 ];
            
get_user_nameIndexszNamecharsmaxszName ) );
            
get_user_ipIndexIpcharsmaxIp ) );
            
geoip_countryIpszCountrycharsmaxszCountry ) );

            
client_printi_Indexprint_console"%s | %s | %s"szNameIpszCountry );
        }
    }

    return 
PLUGIN_CONTINUE;

giumbalau is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-21-2021 , 05:39   Re: set admin acces
Reply With Quote #2

You can set admin access for this command in cmdaccess.ini. The command should already be listed and you simply need to change the flag that you want to require to use the command. You can find what flag you need to use by looking in users.ini. The flag for kick is "c".
__________________
fysiks is offline
giumbalau
Member
Join Date: Jan 2021
Old 02-21-2021 , 10:56   Re: set admin acces
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
You can set admin access for this command in cmdaccess.ini. The command should already be listed and you simply need to change the flag that you want to require to use the command. You can find what flag you need to use by looking in users.ini. The flag for kick is "c".
Yes but the problem is that i want to add this command in admincmd ... i have lot of plugins and my server is lagging
giumbalau is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-21-2021 , 16:13   Re: set admin acces
Reply With Quote #4

The number of plugins has nothing to do with your server lagging. You can have 1000 plugins if you want.

One poorly coded plugin is enough to cause problems. Moreover, I don't see how adding it in another plugin will prevent cmdaccess.ini from working.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-21-2021 , 18:41   Re: set admin acces
Reply With Quote #5

You should always put new commands in a non-default plugin when possible (i.e. create a new plugin for your custom admin commands) because it will cause issues when you attempt to upgrade AMX Mod X. Also, it doesn't matter what plugin the commands are in. It doesn't matter what plugin the command is in, cmdaccess.ini will still work. It has nothing to do with number of plugins or your server's poor performance.
__________________
fysiks is offline
giumbalau
Member
Join Date: Jan 2021
Old 02-22-2021 , 02:53   Re: set admin acces
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
You should always put new commands in a non-default plugin when possible (i.e. create a new plugin for your custom admin commands) because it will cause issues when you attempt to upgrade AMX Mod X. Also, it doesn't matter what plugin the commands are in. It doesn't matter what plugin the command is in, cmdaccess.ini will still work. It has nothing to do with number of plugins or your server's poor performance.
Ok thanks
giumbalau 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 11:58.


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