include amxmodx ---------------EDIT ME------------------ define ADMIN_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include <amxmodx>
/*---------------EDIT ME------------------*/
#define ADMIN_CHECK ADMIN_KICK
static const COLOR[] = "^x01" //default color
static const CONTACT[] = ""
/*----------------------------------------*/
new maxplayers
new gmsgSayText
public plugin_init(){
register_plugin("Admin Check", "1.51", "OneEyed (modified)")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}
public handle_say(id){
new said[192]
read_args(said,192)
if((containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/admin") != -1)
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}
public print_adminlist(user){
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len
get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]){
format(contactinfo, 111, "%s Feedback: %s", COLOR, contact)
}else{
format(contactinfo, 111, "")
}
for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_CHECK)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "%s Admins online: ",COLOR)
if(count > 0){
for(x = 0 ; x < count ; x++){
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
}
format(message, 111, "%s", contactinfo)
print_message(user, message)
}
else{
len += format(message[len], 255-len, "No admins online. %s", contactinfo)
print_message(user, message)
}
}
print_message(id, msg[]){
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}