AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Adding required admin level (https://forums.alliedmods.net/showthread.php?t=168423)

SGT 09-28-2011 22:45

Adding required admin level
 
I need this plugin to work for admins with ADMIN_KICK only instead of all admins. How do I do that?

Blue Snake. 09-29-2011 01:27

Re: Adding required admin level
 
PHP Code:

public client_putinserver(id)
    
g_admin[id] = is_user_admin(id); 

To
PHP Code:

public client_putinserver(id)
    if(
access(idADMIN_KICK)) g_admin[id] = true


You'll need amxmisc.

SGT 09-29-2011 06:36

Re: Adding required admin level
 
Works, thanks.

Blue Snake. 09-29-2011 11:29

Re: Adding required admin level
 
I think you'll need an 'else' with g_admin[id]=false....just no i've seen.... It might give admin color to some players witch don't have access.


PHP Code:

public client_putinserver(id)
    if(
access(idADMIN_KICK))
        
g_admin[id] = true;
    else
        
g_admin[id] = false



All times are GMT -4. The time now is 19:44.

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