/admin Plugini Farklı - Kuheylan94 - 28-06-13
Arkadaşlar var mı bilmiyorum böyle bi plugin varsa kusuruma bakmayın. /admin yazınca ban yetkisi olanlar Online Adminler:x,y Şeklinde slot yetkisi olanlar Online Slotlar: z,t şeklinde görünmesini istiyorum
PHP Code: #include <amxmodx>
/*---------------EDIT ME------------------*/ #define ADMIN_CHECK ADMIN_KICK
static const COLOR[] = "^x04" //green static const CONTACT[] = "" /*----------------------------------------*/
new maxplayers new gmsgSayText
public plugin_init() { register_plugin("Admin Check", "1.51", "OneEyed") 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 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) ? ", ":"") if(len > 96 ) { print_message(user, message) len = format(message, 255, "%s ",COLOR) } } print_message(user, message) } else { len += format(message[len], 255-len, "No admins online.") print_message(user, message) } get_cvar_string("amx_contactinfo", contact, 63) if(contact[0]) { format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact) print_message(user, contactinfo) } }
print_message(id, msg[]) { message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id) write_byte(id) write_string(msg) message_end() }
Cevap: /admin Plugini Farklı - akcaliberkk - 28-06-13
PHP Code: #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ı - Kuheylan94 - 28-06-13
teşekkürler
Cevap: /admin Plugini Farklı - akcaliberkk - 29-06-13
Çözülmüş İsteklere taşındı.
|