Raised This Month: $12 Target: $400
 3% 

[REQ] Admin can't ban superadmins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 10-19-2018 , 03:11   [REQ] Admin can't ban superadmins
Reply With Quote #1

Hello. I want to do that admin (with flag o) do not have permission to ban superadmins (with flag p). I don't want to use immunity to superadmins because then owners can't ban these supers.

What I have to do? I have simple code

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

#define PLUGIN "Block Admins Without Immunity"
#define VERSION "1.0"
#define AUTHOR "[R]ak"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_concmd("amx_ban""Check")
    
register_concmd("amx_kick""Check")
    
register_concmd("amx_slap""Check")
    
register_concmd("amx_slay""Check")
}

public 
Check(id) {
    new 
Victim[32]
    
    
read_argv(1Victim31)
    
    new 
player cmd_target(idVictim8)
    
    if(!
player)
        return 
PLUGIN_HANDLED
    
    
if(get_user_flags(id) & ADMIN_CVAR || !is_user_admin(player))
        return 
PLUGIN_CONTINUE
        
    
return PLUGIN_HANDLED


Last edited by LithuanianJack; 10-19-2018 at 03:48.
LithuanianJack is offline
 



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 04:03.


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