Cevap: /admin Plugini Farklı
PHP- Kodu:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define ADMIN_FLAG ADMIN_BAN
#define SLOT_FLAG ADMIN_RESERVATION
new message_saytext;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /admin","HookSay")
register_clcmd("say /admins","HookSay")
message_saytext = get_user_msgid("SayText");
}
public HookSay(id) {
new players[32],inum;
new a_text[256],s_text[256],a_count,s_count;
get_players(players,inum)
static tempid,name[32];
for(new i;i<inum;i++) {
tempid = players[i];
if(access(tempid,ADMIN_FLAG)) {
get_user_name(tempid,name,31)
format(a_text,255,"%s %s,",a_text,name)
a_count++
}
else if(access(tempid,SLOT_FLAG)) {
get_user_name(tempid,name,31)
format(s_text,255,"%s %s,",s_text,name)
s_count++
}
}
format(a_text,255,"^4Online Adminler: ^3%s", a_count ? a_text : "Online Admin Yok")
format(s_text,255,"^4Online Slotlar: ^3%s", s_count ? s_text : "Online Slot Yok")
message_begin(MSG_ONE, message_saytext, {0,0,0}, id)
write_byte(id)
write_string(a_text)
message_end()
message_begin(MSG_ONE, message_saytext, {0,0,0}, id)
write_byte(id)
write_string(s_text)
message_end()
}
Cevap: /admin Plugini Farklı
Cevap: /admin Plugini Farklı
Çözülmüş İsteklere taşındı.