Thread: [Solved] chat message just for admins
View Single Post
lexzor
Veteran Member
Join Date: Nov 2020
Old 01-18-2021 , 11:03   Re: chat message just for admins
Reply With Quote #5

is this correct?

PHP Code:
public adminmenu_handler(idkey){
    switch(
key){
        case 
0: {
            new 
players[32], inumiPlayer
            
new name[MAX_PLAYERS 1]
            
get_user_name(idnamecharsmax(name))
            if(
AntiChanger){
                
AntiChanger false
                server_cmd
("amx_cvar anti_steamid_changer 1")
                } else if (!
AntiChanger){
                
AntiChanger true
                server_cmd
("amx_cvar anti_steamid_changer 0")
            }
            
get_players(playersinum)
            for (new 
i=1i<=inumi++){
                
players[i] = iPlayer
                
if(get_user_flags(iPlayer) & ADMIN_FLAGColorChat(idGREEN"%s Admin^4 %s^1%s Anti SteamID Changer!"tagnameAntiChanger "enabled" "disabled")
            }
            
adminmenu(id)
        }
        
        case 
9:{
            
menuVIP(id)
        }
    }

and should i use switch to check that boolean? idk if it's a good idea to use switch in a switch

Last edited by lexzor; 01-18-2021 at 11:08.
lexzor is offline