Raised This Month: $ Target: $400
 0% 

Admin remove vip access


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hardboy
Member
Join Date: Jun 2014
Location: Greece
Old 06-10-2015 , 16:10   Admin remove vip access
Reply With Quote #1

Hello everybody i have 1 code and i need when have admin on server vips with have access bceit set flag to bit!

When admin leave on server vip can take back access!

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

#define ACCESS ADMIN_BAN

new vip_flag[] = {
"bceit"    
}


new 
owner[] = {
"abcdefghijklmnopqrstuvwxy"
}

new 
vip[] = {
"bit"
}

new 
vipflag;
new 
vips;
new 
owners;

public 
plugin_init() {
register_plugin("access denied by admin for vip""1.0""hardboy");
register_concmd("amx_vip_set""vipset"ACCESS,"This command set all vips flags to <bit>");
register_concmd("amx_vip_reset""vipreset"ACCESS,"This command set all vips flags to <bceit>");
register_concmd("amx_access_list""who"ADMIN_RCON"View all access", -1)

owners read_flags(owner);
vips read_flags(vip_flag);
vipflag read_flags(vip);
}

public 
who(idlevelcid)
{
    if( !
cmd_accessidlevelcid) )
        return 
PLUGIN_HANDLED;
        
    new 
configsDir[64]
    
get_configsdir(configsDir63)
    
    if(
get_user_flags(id) == owners)
    
show_motd(id"addons/amxmodx/configs/users.ini","Access type")
    
    return 
PLUGIN_HANDLED;
}

public 
vipset(id){

    new 
players[32],player,inum,a;
    
get_players(players,inum,"bceit");
    
player players[a];
    if(
get_user_flags(player) == vips) {
        
set_user_flags(id,vipflag);
        
client_print(id,print_chat,"You'r access has set to bit why have admin!")
    }

    return 
PLUGIN_HANDLED;
}

public 
vipreset(id){

    new 
players[32],player,inum,a;
    
get_players(players,inum,"bceit");
    
player players[a];
    if(
get_user_flags(player) == vips) {
        
set_user_flags(id,vips);
        
client_print(id,print_chat,"You'r access has been back! DONT ABUSE")
    }

    return 
PLUGIN_HANDLED;

i need to set this auto or use command with cvar
va_auto 0/1 0= auto change access when have admin to server 1= use command to change access!
hardboy is offline
Reply


Thread Tools
Display Modes

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 20:14.


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