#include <amxmodx>#include <amxmisc>new ids[33][33], menu[33], mpl;public plugin_init(){ register_plugin("Screen Menu", "1.0", "Sho0ter"); register_concmd("amx_screen", "cmd_screen", ADMIN_BAN); register_menucmd(register_menuid("screen menu"), 1023, "screen_menu") mpl = get_maxplayers(); return PLUGIN_CONTINUE;}public cmd_screen(id, level, cid){ if(!cmd_access(id, level, cid, 0)) { return PLUGIN_HANDLED; } return show_screen_menu(id, menu[id] = 0);}public show_screen_menu(id, pos){ if(pos < 0) { return PLUGIN_HANDLED; } new body[1024], name[32], keys = MENU_KEY_0, len, num, pid, key; for(new p; p < mpl; p++) { if(!is_user_connected(p) || is_user_bot(p) || is_user_hltv(p)) { continue; } ids[id][num++] = p; } new start = pos * 8; if(start > num) { return show_screen_menu(id, pos - 1); } new end = start + 8; if(end > num) { end = num; } len = format(body, 1023, "\yКому будем делать скриншот?^n^n"); for(new i = start; i < end; i++) { pid = ids[id][i]; get_user_name(pid, name, 31); if(get_user_flags(pid) & ADMIN_IMMUNITY) { len += format(body[len], 1023 - len, "\d%d. %s^n", ++key, name); } else { keys |= (1<<key); len += format(body[len], 1023 - len, "\r%d. \w%s^n", ++key, name); } } len += format(body[len], 1023 - len, "^n\%s9. \%sДальше^n\r0. \w%s", (end >= num) ? "d" : "r", (end >= num) ? "d" : "w", pos ? "Назад" :"Выход"); show_menu(id, keys, body, -1, "screen menu"); return PLUGIN_HANDLED;}public screen_menu(id, key){ switch(key) { case 8: return show_screen_menu(id, ++menu[id]); case 9: return show_screen_menu(id, --menu[id]); default: { new pid = ids[id][menu[id] * 8 + key]; if(!is_user_connected(pid)) { client_print(id, print_chat, "Этот игрок покинул сервер..."); return show_screen_menu(id, menu[id]); } else if(get_user_flags(pid) & ADMIN_IMMUNITY) { client_print(id, print_chat, "У этого игрока иммунитет!"); return show_screen_menu(id, menu[id]); } new servername[128], plname[32], keyname[32], plip[32], Date[64]; get_cvar_string("hostname", servername, 127); get_user_name(id, plname, 31); get_user_name(pid, keyname, 31); get_user_ip(pid, plip, 31, 1); get_time("%d/%m/%Y - %H:%M:%S", Date, 63); for(new i; i <= mpl; i++) { if((is_user_hltv(i) || i == pid || i == id) && is_user_connected(i)) { print(i, "^1[^4Screen^1] ^3%s ^1| ^3%s ^1| ^3%s | ^1%s | ^3%s", servername, keyname, plip, Date, plname); set_hudmessage(0, 255, 0, -1.0, 0.8, 0, 6.0, 1.0, 0.0, 0.0, -1); show_hudmessage(i, "%s^n%s^n%s^n%s^n%s", servername, keyname, plip, Date, plname); } } client_cmd(pid, "wait;wait;wait;snapshot"); return show_screen_menu(id, menu[id]); } } return PLUGIN_HANDLED;}stock print(id, const input[], any:...){ new message[192]; vformat(message, 191, input, 3); message[190] = '^0'; new team = get_user_team(id); if(team != 1) { tmi(id, 1); } static msgid; if(msgid || (msgid = get_user_msgid("SayText"))) { message_begin(MSG_ONE, msgid, _, id); write_byte(id); write_string(message); message_end(); } if(team != 1) { tmi(id, team); } return PLUGIN_HANDLED}stock tmi(id, team){ static msgid; static const teams[4][] = { "UNASSIGNED", "TERRORIST", "CT", "SPECTATOR" } if(msgid || (msgid = get_user_msgid("TeamInfo"))) { message_begin(MSG_ONE, msgid, _, id); write_string(teams[team]); message_end(); } return PLUGIN_CONTINUE} RAW Paste Data