hlmod.hu https://hlmod.hu/ |
|
admin_check https://hlmod.hu/viewtopic.php?f=10&t=3248 |
Oldal: 1 / 1 |
Szerző: | djarpi [2012.01.28. 22:04 ] |
Hozzászólás témája: | admin_check |
Hali ki tudna nekem segiteni hogy lehet az meg csinalni hogy ha valaki be irja hogy /admin és hangot jatszik le amit en alitok be hangnak ha lehet a hangnak ez a neve legyen admin.wav elore is koszi ![]() ---------------------------------------------------------- #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() } |
Szerző: | Silent [2012.01.29. 07:01 ] |
Hozzászólás témája: | Re: admin_check |
Vhogy így lesz: Kód:
|
Szerző: | kiki [2012.01.29. 08:07 ] |
Hozzászólás témája: | Re: admin_check |
Silent írta: Vhogy így lesz: Kód:
+ precache |
Szerző: | Silent [2012.01.29. 09:40 ] |
Hozzászólás témája: | Re: admin_check |
Ajj xD Legvégére írd be: Kód:
|
Szerző: | djarpi [2012.01.29. 10:57 ] |
Hozzászólás témája: | Re: admin_check |
koszi ![]() |
Oldal: 1 / 1 | Minden időpont UTC+02:00 időzóna szerinti |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |