•  
     

get_user_flags - É admin e usa a flag Kick!- AMXX

Código: Selecionar todos

#include amxmodx
public plugin_init(){
register_plugin("Test","1.0","Anderson");
register_clcmd("say /admin","admin");
register_clcmd("say_team /admin","admin");
}


public admin(id){
if(get_user_flags(id) & ADMIN_KICK){
set_hudmessage(255,255,255,0.44,0.35,0,6.0,10.0);
show_hudmessage(id,"É admin e usa a flag Kick!");
}else{
set_hudmessage(255,255,255,0.44,0.35,0,6.0,10.0);
show_hudmessage(id,"Não é Admin!");    
}
}


get_user_flags.jpg
 

Código: Selecionar todos

#define ADMIN_ALL		0	//Everyone
#define ADMIN_IMMUNITY		1	//Flag "a", immunity
#define ADMIN_RESERVATION	2	//Flag "b", reservation
#define ADMIN_KICK		4	//Flag "c", kick
#define ADMIN_BAN		8	//Flag "d", ban
#define ADMIN_SLAY		16	//Flag "e", slay
#define ADMIN_MAP		32	//Flag "f", map change
#define ADMIN_CVAR		64	//Flag "g", cvar change
#define ADMIN_CFG		128	//Flag "h", config execution
#define ADMIN_CHAT		256	//Flag "i", chat
#define ADMIN_VOTE		512	//Flag "j", vote
#define ADMIN_PASSWORD		1024	//Flag "k", sv_password
#define ADMIN_RCON		2048	//Flag "l", rcon access
#define ADMIN_LEVEL_A		4096	//Flag "m", custom
#define ADMIN_LEVEL_B		8192	//Flag "n", custom
#define ADMIN_LEVEL_C		16384	//Flag "o", custom
#define ADMIN_LEVEL_D		32768	//Flag "p", custom
#define ADMIN_LEVEL_E		65536	//Flag "q", custom
#define ADMIN_LEVEL_F		131072	//Flag "r", custom
#define ADMIN_LEVEL_G		262144	//Flag "s", custom
#define ADMIN_LEVEL_H		524288	//Flag "t", custom
#define ADMIN_MENU		1048576	//Flag "u", menus
#define ADMIN_ADMIN		16777216	//Flag "y", default admin
#define ADMIN_USER		33554432	//Flag "z", default user
#define FLAG_KICK		1	//Auth flag "a", kick if no auth
#define FLAG_TAG		2	//Auth flag "b", auth by tag
#define FLAG_AUTHID		4	//Auth flag "c", auth by WON/Steam ID
#define FLAG_IP			8	//Auth flag "d", auth by IP address
#define FLAG_NOPASS		16	//Auth flag "e", don't require password