Jump to content

Search the Community

Showing results for tags 'black screen cs 1.6 vote map'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Administrativ
    • Forum
    • Zona utilizatorilor
    • Afiliere
    • OldGods - It's fun to be a GOD! ~ Steam Group
    • OldGods - It's fun to be a GOD! ~ GameTracker.com Group
  • Serverele comunitatii
    • TS.OLDGODS.RO
    • CS.OLDGODS.RO # CLASIC
    • RESPAWN.OLDGODS.RO # RESPAWN
    • Servere MIX Counter-Strike 1.6
    • MTA.OLDGODS.RO - Multi Theft Auto: San Andreas
  • Echipe OldGods
    • Dota 2 - EVENING DESTROYERS
  • General
    • Design zone
    • Social
    • Gaming, Multimedia & Tehnologie
    • Resurse jocuri
  • Arhiva
    • Arhiva generala

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Server preferat

Found 1 result

  1. 1. Nume plugin: Super Map Choser 2. Autor & Versiune: istonic / 3.0 3. Comenzi: - 4. Cvar: 5. Alte detalii: Acest plugin va da vot hartii in ultima runda, mai exact in ultima runda a hartii (cand expira timpul hartii) se va face ecranul negru, jucatorii vor fi blocati si fiecare trebuie sa aleaga harta urmatoare. Pe mijlocul ecranului apare un mesaj HUD cu nr. de vot - harta. ATENTIE: ca plugin-ul sa functioneze corect, trebuie sa dezactivati plugin-ul "mapchoser.amxx" care vine default in server, la fel si orice alt plugin de vot al hartilor sau prelungire de runda. 6. Link download: #include <amxmodx> #include <colorchat> new const PLUGIN[] = "Super Mapchooser" new const VERSION[] = "3.0" new const AUTHOR[] = "Prayer/Safety1st" new g_teamScore[2] new nextmap, vote_answers, maxspeed new mp_timelimit, mp_winlimit, mp_maxrounds, mp_roundtime new extendmapmax_pcvar, extendmapstep_pcvar, votetime_pcvar, votemaps_pcvar new result_red_pcvar, result_green_pcvar, result_blue_pcvar #define TASK_PLUGIN_ID 44747477 #define TASK_SCREEN_ID 979699 #define TASK_RESULT_ID 12111 const HudLen = 512 new msg[128] new Array:g_mapName new g_mapNums new g_saveids[10] new g_voteCount[10] new g_nextName[10] new g_lastMap[32] new g_currentMap[32] new g_mapVoteNum new g_votemaps new g_maxspeed = 320 new Float:f_timelimit = 0.0 // we want to restore timelimit only if we touched it new bool:willbevote = false // there will be a vote new bool:voteStarted = false // there is vote in progress new bool:forceBlock = true // block player's selections if vote is canceled new bool:hasExtend = false // map was extended new bool:lastRound = false // map changing will be at the current round end new bool:forceChange = true // we should force map end in case if it is not round-based limit coming soon new bool:hasBlind[33] = { false, ... } new g_msgScreenFade new g_PlayersVoted = 0 new g_PlayersNum = 0 new g_result_red, g_result_green, g_result_blue public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_cvar("super_mapchooser",VERSION,FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED) register_dictionary_colored("super_mapchooser.txt") extendmapmax_pcvar = register_cvar("amx_extendmap_max", "90")//Максимальное количество минут. Когда несколько раз продлевается карта - это значение будет максимальным в timelimit'е extendmapstep_pcvar = register_cvar("amx_extendmap_step", "15")//На сколько минут продлевать карту, если проголосовали за ее продление. register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0") register_event("TextMsg", "Event_RestartRound", "a", "2&#Game_C", "2&#Game_w") register_event("ScreenFade", "Event_ScreenFade", "be") register_event("TeamScore", "team_score", "a") register_logevent("Event_RoundEnd", 2, "0=World triggered","1=Round_End") votetime_pcvar = register_cvar("mapchooser_votetime", "15") //Сколько времени в секундах должно идти голосование votemaps_pcvar = register_cvar("mapchooser_votemaps", "5") //Сколько карт выводить на голосование помимо текущей карты // Каким цветом показывать результаты голосования. Формат RGB result_red_pcvar = register_cvar("mapchooser_result_red", "0") //Красный result_green_pcvar = register_cvar("mapchooser_result_green", "255") //Зеленый result_blue_pcvar = register_cvar("mapchooser_result_blue", "100") //Синий g_msgScreenFade = get_user_msgid("ScreenFade") set_task(8.0, "taskListening", TASK_PLUGIN_ID, "", 0, "b") } public plugin_cfg() { nextmap = get_cvar_pointer("amx_nextmap") vote_answers = get_cvar_pointer("amx_vote_answers") maxspeed = get_cvar_pointer("sv_maxspeed") mp_timelimit = get_cvar_pointer("mp_timelimit") mp_winlimit = get_cvar_pointer("mp_winlimit") mp_maxrounds = get_cvar_pointer("mp_maxrounds") mp_roundtime = get_cvar_pointer("mp_roundtime") g_votemaps = get_pcvar_num(votemaps_pcvar) if(g_votemaps > 8) g_votemaps = 8 else if(g_votemaps < 1) g_votemaps = 1 register_menucmd(register_menuid("superMapChooserMenu"), (-1^(-1<<(g_votemaps + 1))), "countVote") g_mapName = ArrayCreate(32) get_localinfo("lastMap", g_lastMap, sizeof g_lastMap -1) set_localinfo("lastMap", "") new maps_ini_file[64] get_localinfo("amxx_configsdir", maps_ini_file, sizeof maps_ini_file -1) format(maps_ini_file, sizeof maps_ini_file -1, "%s/maps.ini", maps_ini_file) if(!file_exists(maps_ini_file)) get_cvar_string("mapcyclefile", maps_ini_file, sizeof maps_ini_file -1) if(loadSettings(maps_ini_file)) Reset() g_maxspeed = get_pcvar_num(maxspeed) get_mapname(g_currentMap, sizeof g_currentMap -1) } public client_disconnect(id) { remove_task(id+TASK_SCREEN_ID) remove_task(id+TASK_RESULT_ID) hasBlind[id] = false } public Event_RestartRound() Reset() public Event_RoundEnd() { if(lastRound && forceChange) set_task(4.5,"ForceChangeMap") } public ForceChangeMap() { // trick: decrease mp_timelimit value to force map change. 0.3 min was carefully chosen by experiments set_pcvar_float(mp_timelimit, get_gametime() / 60.0 - 0.3) } public Reset() { g_PlayersVoted = 0 g_PlayersNum = 0 if(voteStarted) { voteStarted = false forceBlock = true remove_task(TASK_PLUGIN_ID) // remove 'checkVotes' task if(!hasExtend) { formatex(msg, 127, "%L", LANG_PLAYER, "INTERRUPTED") ColorChat(0, GREEN, msg) } else hasExtend = false } if(willbevote) { set_task(8.0, "taskListening", TASK_PLUGIN_ID, "", 0, "b") if(f_timelimit > 0.0) set_pcvar_float(mp_timelimit, f_timelimit) } willbevote = false lastRound = false forceChange = true } public PauseGame() { new players[32], pid get_players(players, g_PlayersNum) for(new i=0;i<g_PlayersNum;i++) { pid = players[i] hasBlind[pid] = true message_begin(MSG_ONE, g_msgScreenFade, _, pid) write_short(1<<12) // Duration write_short(1<<9) // Hold time write_short(1<<0) // Fade type write_byte(0) // Red write_byte(0) // Green write_byte(0) // Blue write_byte(255) // Alpha message_end() set_task(1.0, "cmdFadeScreen", pid+TASK_SCREEN_ID, "", 0, "b") } set_pcvar_num(maxspeed, 0) } public ContinueGame() { new players[32], num, pid get_players(players, num) for(new i=0;i<num;i++) { pid = players[i] hasBlind[pid] = false remove_task(pid+TASK_SCREEN_ID) remove_task(pid+TASK_RESULT_ID) message_begin(MSG_ONE, g_msgScreenFade, _, pid) write_short(1<<0) write_short(1<<0) write_short(1<<0) write_byte(0) write_byte(0) write_byte(0) write_byte(0) message_end() } set_pcvar_num(maxspeed, g_maxspeed) } public taskListening() { new winlimit = get_pcvar_num(mp_winlimit) if(winlimit) { new c = winlimit - 2 if(!((c > g_teamScore[0]) && (c > g_teamScore[1]))) { forceChange = false willbevote = true } } new maxrounds = get_pcvar_num(mp_maxrounds) if(maxrounds) { if(!((maxrounds - 2) > (g_teamScore[0] + g_teamScore[1]))) { forceChange = false willbevote = true } } new Float:f_timeleft new Float:f_diff new Float:f_roundtime f_timeleft = float(get_timeleft()) if (f_timeleft) { f_roundtime = get_pcvar_float(mp_roundtime) * 60.0 f_diff = f_roundtime - f_timeleft + get_pcvar_float(votetime_pcvar) + 15.0 // we need additional 10 seconds upper to don't get countdown voice if(!(f_timeleft < 1.0 || f_timeleft > f_diff)) willbevote = true } if(!willbevote) return remove_task(TASK_PLUGIN_ID) // remove 'taskListening' task formatex(msg, 127, "%L", LANG_PLAYER, "VOTE_NEXT_ROUND") ColorChat(0, GREEN, msg) // increase timelimit if it might elapse earlier than needed if (f_timeleft) { f_timelimit = get_pcvar_float(mp_timelimit) // save current timelimit set_pcvar_float(mp_timelimit, f_timelimit + f_diff / 60.0) } } public Event_NewRound() { if(willbevote && !lastRound) { forceBlock = false hasExtend = false g_result_red = get_pcvar_num(result_red_pcvar) g_result_green = get_pcvar_num(result_green_pcvar) g_result_blue = get_pcvar_num(result_blue_pcvar) cmdVoteNextmap() } } public cmdVoteNextmap() { new mkeys = ((1<<g_votemaps) + 1), menu[HudLen], a new pos = format(menu, HudLen -1, " \r%L:^n^n", LANG_PLAYER, "VOTE_TITLE") new dmax = (g_mapNums > g_votemaps) ? g_votemaps : g_mapNums new unki = 0 for(g_mapVoteNum = 0; g_mapVoteNum < dmax; g_mapVoteNum++) { a = random_num(0, g_mapNums -1) while(isInMenu(a)) { if(++a >= g_mapNums) { a = 0 } } g_nextName[g_mapVoteNum] = a new map[32] ArrayGetString(g_mapName, a, map, sizeof map -1) pos += format(menu[pos], HudLen -1, " \y%d.\w %s^n", g_mapVoteNum + 1, map) g_saveids[unki] = a unki++ mkeys |= (1<<g_mapVoteNum) g_voteCount[g_mapVoteNum] = 0 } g_voteCount[g_votemaps] = 0 g_voteCount[g_votemaps + 1] = 0 new winlimit = get_pcvar_num(mp_winlimit) new maxrounds = get_pcvar_num(mp_maxrounds) if((winlimit + maxrounds) == 0 && f_timelimit < get_pcvar_float(extendmapmax_pcvar)) { pos += format(menu[pos], HudLen -1, " \y%d.\w %s \y[%L]", g_votemaps + 1, g_currentMap, LANG_PLAYER, "PROLONG") mkeys |= (1<<g_votemaps) } show_menu(0, mkeys, menu, get_pcvar_num(votetime_pcvar), "superMapChooserMenu") formatex(msg, 127, "%L", LANG_PLAYER, "VOTE_STARTED") ColorChat(0, GREEN, msg) client_cmd(0, "spk gman/gman_choose2") set_task(get_pcvar_float(votetime_pcvar), "checkVotes", TASK_PLUGIN_ID) PauseGame() voteStarted = true log_amx("Super Vote: Voting for the nextmap started") } public checkVotes() { voteStarted = false new bolt = 0 for(new a = 0; a < g_mapVoteNum; a++) { if(g_voteCount[bolt] < g_voteCount[a]) bolt = a } //clear channel #2 set_hudmessage(.channel=2) show_hudmessage(0, "") set_hudmessage(255, 127, 0, -1.0, 0.42, 2, 0.1, 10.0, 0.05, 1.0, 2) if((g_voteCount[g_votemaps] > g_voteCount[bolt]) && (g_voteCount[g_votemaps] > g_voteCount[g_votemaps + 1])) { new Float:steptime = get_pcvar_float(extendmapstep_pcvar) f_timelimit = f_timelimit + steptime formatex(msg, 127, "%L", LANG_PLAYER, "MAP_EXTENDING", steptime) ColorChat(0, TEAM_COLOR, msg) show_hudmessage(0, "%L", LANG_PLAYER, "MAP_EXTENDING_HUD", steptime) log_amx("Super Vote: Voting for the nextmap finished. Map %s will be extended to next %.0f minutes", g_currentMap, steptime) hasExtend = true Reset() ContinueGame() return } new smap[32] if(g_voteCount[bolt] && (g_voteCount[g_votemaps + 1] <= g_voteCount[bolt])) { ArrayGetString(g_mapName, g_nextName[bolt], smap, sizeof smap -1) set_pcvar_string(nextmap, smap) } else get_pcvar_string(nextmap, smap, sizeof smap -1) // get nextmap name in case if no one voted formatex(msg, 127, "%L", LANG_PLAYER, "NEXT_MAP_CHOSEN", smap) ColorChat(0, TEAM_COLOR, msg) show_hudmessage(0, "%L", LANG_PLAYER, "NEXT_MAP_CHOSEN_HUD", smap) if(forceChange) { formatex(msg, 127, "%L", LANG_PLAYER, "LAST_ROUND") ColorChat(0, TEAM_COLOR, msg) set_hudmessage(255, 0, 0, -1.0, 0.58, 2, 0.1, 10.0, 0.05, 1.0, 1) show_hudmessage(0, "%L", LANG_PLAYER, "LAST_ROUND_HUD") } new players[32], num, pid get_players(players, num) for(new i=0;i<num;i++) { pid = players[i] remove_task(pid+TASK_RESULT_ID) } log_amx("Super Vote: Voting for the nextmap finished. The nextmap will be %s", smap) lastRound = true // increase timelimit if it might elapse earlier than current round new Float:f_timeleft = float(get_timeleft()) if(f_timeleft) // there is timelimit for map definately set_pcvar_float(mp_timelimit, get_gametime() / 60.0 + get_pcvar_float(mp_roundtime)) ContinueGame() } public countVote(id, key) { if(!voteStarted && forceBlock) return PLUGIN_HANDLED if(get_pcvar_float(vote_answers)) { new name[32] get_user_name(id, name, sizeof name -1) if(key == g_votemaps) { formatex(msg, 127, "%L", LANG_PLAYER, "VOTED_EXTEND", name) ColorChat(0, DontChange, msg) } else if(key < g_votemaps) { new map[32] ArrayGetString(g_mapName, g_nextName[key], map, sizeof map -1) formatex(msg, 127, "%L", LANG_PLAYER, "VOTED", name, map) ColorChat(0, DontChange, msg) } cmdShowResults(id+TASK_RESULT_ID) set_task(0.8, "cmdShowResults", id+TASK_RESULT_ID, "", 0, "b") } client_cmd(id, "spk UI/buttonclickrelease") g_voteCount[key]++ g_PlayersVoted++ return PLUGIN_HANDLED } public cmdShowResults(pid) { static id id = pid-TASK_RESULT_ID if(is_user_connected(id)) { static i, len, message[HudLen] len = format(message, sizeof message -1, "%L^n^n", LANG_PLAYER, "VOTE_RESULTS") for(i=0;i<g_votemaps;i++) { new map[32] ArrayGetString(g_mapName, g_saveids[i], map, sizeof map -1) len += format(message[len], HudLen -1, "[%d] | %s^n", g_voteCount[i], map) } len += format(message[len], HudLen -1, "[%d] | %s [%L]^n^n", g_voteCount[i], g_currentMap, LANG_PLAYER, "PROLONGED") len += format(message[len], HudLen -1, "%L", LANG_PLAYER, "VOTE_TOTAL", g_PlayersVoted, g_PlayersNum) set_hudmessage(g_result_red, g_result_green, g_result_blue, 0.36, 0.3, 0, 1.0, 4.0, 0.1, 0.2, 2) show_hudmessage(id, message) } } public Event_ScreenFade(id) { if(hasBlind[id]) { set_task(0.6, "cmdFadeScreen", id+TASK_SCREEN_ID) } } public cmdFadeScreen(pid) { new id = pid-TASK_SCREEN_ID if(is_user_connected(id)) { message_begin(MSG_ONE, g_msgScreenFade, _, id) write_short(1<<0) // Duration write_short(1<<0) // Hold time write_short(1<<2) // Fade type write_byte(0) // Red write_byte(0) // Green write_byte(0) // Blue write_byte(255) // Alpha message_end() } } public plugin_end() { new current_map[32] set_pcvar_num(maxspeed, g_maxspeed) get_mapname(current_map, sizeof current_map -1) set_localinfo("lastMap", current_map) } stock bool:ValidMap(mapname[]) { if(is_map_valid(mapname)) { return true } new len = strlen(mapname) -4 if(len < 0) { return false } if(equali(mapname[len], ".bsp")) { mapname[len] = '^0' if(is_map_valid(mapname)) { return true } } return false } loadSettings(filename[]) { if(!file_exists(filename)) return 0 new currentMap[32], szText[32], buff[256] get_mapname(currentMap, sizeof currentMap -1) new fp = fopen(filename, "r") while(!feof(fp)) { buff[0] = '^0' fgets(fp, buff, sizeof buff -1) parse(buff, szText, sizeof szText -1) if((szText[0] != ';') && ValidMap(szText) && !equali(szText, g_lastMap) && !equali(szText, currentMap)) { ArrayPushString(g_mapName, szText) g_mapNums++ } } fclose(fp) return g_mapNums } bool:isInMenu(id) { for(new a = 0; a < g_mapVoteNum; a++) { if(id == g_nextName[a]) { return true } } return false } //From the AMXX nextmap base file public team_score() { new team[2] read_data(1,team,1) g_teamScore[(team[0]=='C') ? 0 : 1] = read_data(2) } /* Описание: Super MapChooser - альтернатива стандартному плагину mapchooser.amxx В начале последнего раунда экран затухает, игроки останавливаются и предлагается выбрать карту. После выбора карты появляются результаты голосования - сколько игроков проголосовали, за какую карту и кол-во проголосовавших. По истечению времени голосования написано, какая карта будет следующей. Карта меняется в конце раунда. Переменные (уже прописаны в amxx.cfg): На сколько минут продлевать карту, если проголосовали за ее продление. amx_extendmap_step "15.0" Максимальное количество минут. Когда несколько раз продлевается карта - это значение будет максимальным в timelimit'е. amx_extendmap_max "90.0" Переменные (можно прописать в amxx.cfg): Сколько времени в секундах должно идти голосование. (можно изменять в игре до голосования) mapchooser_votetime "15" Сколько карт выводить на голосование не считая карты, которую продлевают в голосовании. (можно изменять в игре - активируется в след. карте) mapchooser_votemaps "5" Минимальное значение 1, максимальное 8 Каким цветом показывать результаты голосования. (можно изменять в игре до голосования) mapchooser_result_red "255" mapchooser_result_green "255" mapchooser_result_blue "255" Установка плагина: 1) Плагин super_mapchooser.amxx кладем в папку с плагинами - addons/amxmodx/plugins 2) Открываем файл addons/amxmodx/configs/plugins.ini 3) Находим там строчку: mapchooser.amxx ; allows to vote for next map 4) Вместо нее вставляем строчку: super_mapchooser.amxx 5) Сохраняем изменения 6) Рестартим сервер... Бонусы: 1) Цветные сообщения. */ super_mapchoser.txt (se adauga in folderul lang) 7. Poze: Sursa: AlliedMods
×
×
  • Create New...