diff --git a/README.md b/README.md index 76672f3..fd938f7 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ Counter-Strike Hide'n'Seek Match System plugins. | hns_last | 1 | Включить/Отключить выдачу гранат последнему ТТ | | hns_dmrespawn | 3 | Время (в секундах), в течение которого игрок возродится в режиме DM | | hns_survotetime | 10 | Время (в секундах), в течение которого идет голосование (surrender) | +| hns_randompick | 1 | Включить/Отключить случайный выбор игроков | | hns_knifemap | 35hp_2 | Ножевая карта | | hns_prefix | MATCH | Префикс системы | @@ -186,6 +187,8 @@ Counter-Strike Hide'n'Seek Match System plugins. | hud / hudinfo | Отключить/Включить худ | | rnw / rocknewwatcher | Голосовать за нового watcher | | wt / watcher | Передать/Назначить нового watcher | +| speclist / showpec | Включить/выключить speclist | +| spechide / hidespec | Включить/выключить spechide | ## Благодарности / Aвторы других плагинов [Garey](https://github.com/Garey27) diff --git a/README_ENG.md b/README_ENG.md index 08d222a..aa0816b 100644 --- a/README_ENG.md +++ b/README_ENG.md @@ -122,6 +122,7 @@ Counter-Strike Hide'n'Seek Match System plugins | hns_last | 1 | Enable/disable grenades to the last TT | | hns_dmrespawn | 3 | Time (in seconds) for the player to revive in DM mode | | hns_survotetime | 10 | Time (in seconds) for surrender | +| hns_randompick | 1 | Enable/disable random player selection | | hns_knifemap | 35hp_2 | Knifemap | | hns_prefix | MATCH | system prefix | @@ -179,6 +180,8 @@ Counter-Strike Hide'n'Seek Match System plugins | hud / hudinfo | disable/enable hud | | rnw / rocknewwatcher | vote for new watcher | | wt / watcher | transfer/assign a new watcher | +| speclist / showspec | Enable/Disable speclist | +| spechide / hidespec | Enable/Disable spechide | ## Acknowledgments / Authors of other plugins [Garey](https://github.com/Garey27) diff --git a/configs/mixsystem/matchsystem.cfg b/configs/mixsystem/matchsystem.cfg index e412946..50534de 100644 --- a/configs/mixsystem/matchsystem.cfg +++ b/configs/mixsystem/matchsystem.cfg @@ -7,6 +7,7 @@ hns_survotetime "10" hns_surtimedelay "120" hns_checkplay "0" hns_rules "0" +hns_randompick "1" hns_knifemap "35hp_2" hns_gamename "Hide'n'Seek" hns_prefix "MATCH" \ No newline at end of file diff --git a/configs/mixsystem/mode/zombie.cfg b/configs/mixsystem/mode/zombie.cfg index ce625c2..5ff38ef 100644 --- a/configs/mixsystem/mode/zombie.cfg +++ b/configs/mixsystem/mode/zombie.cfg @@ -8,7 +8,7 @@ mp_round_infinite b mp_auto_join_team 0 mp_roundrespawn_time -1 mp_buytime 0 -mp_roundover 2 +mp_roundover 1 mp_give_player_c4 0 mp_t_default_weapons_secondary "" mp_ct_default_weapons_secondary "" \ No newline at end of file diff --git a/data/lang/match_additons.txt b/data/lang/match_additons.txt index 198c302..21c5c99 100644 --- a/data/lang/match_additons.txt +++ b/data/lang/match_additons.txt @@ -156,8 +156,8 @@ ROUNDINFO_ON = %s Информация лучших игроков: ^3включ ROUNDINFO_OFF = %s Информация лучших игроков: ^3выключена^1. SPECLIST_ON = %s Список наблюдателей: ^3включен^1. SPECLIST_OFF = %s Список наблюдателей: ^3выключен^1. -SPECHIDE_ON = %s Спрятать в списке наблюдателей: ^3включен^1. -SPECHIDE_OFF = %s Спрятать в списке наблюдателей: ^3выключен^1. +SPECHIDE_ON = %s Спрятаться в списке наблюдателей: ^3включено^1. +SPECHIDE_OFF = %s Спрятаться в списке наблюдателей: ^3выключено^1. DMG_SPAM = %s Пожалуйста, подождите ^3%.1f^1 секунды между командами! DMG_ERR = %s Не существует ИЛИ нескольких игроков с совпадающим шаблоном -> ^3%s^1. diff --git a/scripting/HnsMatchPlayerInfo.sma b/scripting/HnsMatchPlayerInfo.sma index 6247804..8bb4c4f 100644 --- a/scripting/HnsMatchPlayerInfo.sma +++ b/scripting/HnsMatchPlayerInfo.sma @@ -487,7 +487,7 @@ public task_ShowPlayerInfo() { new szSpecMess[512], iSpecLen; new iSpecNum; for (new j = 0; j < MAX_PLAYERS; j++) { - if (!g_eSpecPlayers[show_id][SHOW_SPEC]) { + if (!g_eSpecPlayers[id][SHOW_SPEC]) { break; } diff --git a/scripting/HnsMatchPts.sma b/scripting/HnsMatchPts.sma index 34c1156..9be3351 100644 --- a/scripting/HnsMatchPts.sma +++ b/scripting/HnsMatchPts.sma @@ -238,7 +238,7 @@ SQL_SetPts(TeamName:team_winners) { cData[0] = SQL_WINNERS; new iPlayers[MAX_PLAYERS], iNum; - get_players(iPlayers, iNum, "e", team_winners == TEAM_TERRORIST ? "TERRORIST" : "CT"); + get_players(iPlayers, iNum, "ce", team_winners == TEAM_TERRORIST ? "TERRORIST" : "CT"); if (iNum) { for(new i, szAuthId[MAX_AUTHID_LENGTH]; i < iNum; i++) { @@ -256,7 +256,7 @@ SQL_SetPts(TeamName:team_winners) { iLen = 0; } - get_players(iPlayers, iNum, "e", team_winners == TEAM_TERRORIST ? "CT" : "TERRORIST"); + get_players(iPlayers, iNum, "ce", team_winners == TEAM_TERRORIST ? "CT" : "TERRORIST"); if (iNum) { for(new i, szAuthId[MAX_AUTHID_LENGTH]; i < iNum; i++) { diff --git a/scripting/HnsMatchSystem.sma b/scripting/HnsMatchSystem.sma index 65f83ca..3e06f88 100644 --- a/scripting/HnsMatchSystem.sma +++ b/scripting/HnsMatchSystem.sma @@ -159,6 +159,12 @@ public rgRoundEnd(WinStatus:status, ScenarioEventEndRound:event, Float:tmDelay) return HC_SUPERCEDE; } + if (g_iCurrentMode == MODE_ZM && event == ROUND_TERRORISTS_WIN) { + set_member_game(m_bGameStarted, true); + SetHookChainReturn(ATYPE_BOOL, false); + return HC_SUPERCEDE; + } + if (g_GPFuncs[g_iCurrentGameplay][GP_ROUNDEND]) ExecuteForward(g_GPFuncs[g_iCurrentGameplay][GP_ROUNDEND], _, (status == WINSTATUS_CTS) ? true : false); @@ -485,7 +491,7 @@ public ShowTimeAsMoney() { if (g_iCurrentMode == MODE_MIX && g_iMatchStatus == MATCH_STARTED && g_iCurrentRules == RULES_TIMER) { static players[32], num, id - get_players(players, num, "a"); + get_players(players, num, "ac"); for(--num; num>=0; num--) { id = players[num]; diff --git a/scripting/include/hns-match/addition/captain.inc b/scripting/include/hns-match/addition/captain.inc index b1c9349..9bb7ace 100644 --- a/scripting/include/hns-match/addition/captain.inc +++ b/scripting/include/hns-match/addition/captain.inc @@ -154,7 +154,7 @@ public pickMenu(id, bool:bStartWait) { return PLUGIN_HANDLED; } - if(bStartWait == true) + if(bStartWait == true && g_iSettings[RANDOMPICK] == 1) { WaitPick(); } @@ -320,7 +320,7 @@ public wait_function(id) GetPickRandom() { new iChoose; static iPlayers[MAX_PLAYERS], iNum - get_players(iPlayers, iNum, "he", "SPECTATOR"); + get_players(iPlayers, iNum, "che", "SPECTATOR"); new iSpecPlayers[MAX_PLAYERS], iSpecNum; diff --git a/scripting/include/hns-match/addition/cvars.inc b/scripting/include/hns-match/addition/cvars.inc index 2fb8d0b..cb7498d 100644 --- a/scripting/include/hns-match/addition/cvars.inc +++ b/scripting/include/hns-match/addition/cvars.inc @@ -14,6 +14,7 @@ enum _: CVARS Float:DMRESPAWN, SUTVOTETIME, SURTIMEDELAY, + RANDOMPICK, KNIFEMAP[24], PREFIX[24] } @@ -60,6 +61,9 @@ stock cvars_init() { pCvar[SURTIMEDELAY] = create_cvar("hns_surtimedelay", "120", FCVAR_NONE, "Surrender time delay", true, 0.0); bind_pcvar_num(pCvar[SURTIMEDELAY], g_iSettings[SURTIMEDELAY]); + pCvar[RANDOMPICK] = create_cvar("hns_randompick", "1", FCVAR_NONE, "Random pick", true, 0.0, true, 1.0); + bind_pcvar_num(pCvar[RANDOMPICK], g_iSettings[RANDOMPICK]); + pCvar[KNIFEMAP] = create_cvar("hns_knifemap", "35hp_2", FCVAR_NONE, "Knife map"); bind_pcvar_string(pCvar[KNIFEMAP], g_iSettings[KNIFEMAP], charsmax(g_iSettings[KNIFEMAP])); diff --git a/scripting/include/hns-match/modes/mode_dm.inl b/scripting/include/hns-match/modes/mode_dm.inl index 221496d..eb4cc35 100755 --- a/scripting/include/hns-match/modes/mode_dm.inl +++ b/scripting/include/hns-match/modes/mode_dm.inl @@ -76,7 +76,7 @@ public LuckyTransferToTT(id) { GetRandomCT() { static iPlayers[32], iCTNum - get_players(iPlayers, iCTNum, "ahe", "CT"); + get_players(iPlayers, iCTNum, "ache", "CT"); if (!iCTNum) return 0 diff --git a/scripting/include/hns-match/modes/mode_knife.inl b/scripting/include/hns-match/modes/mode_knife.inl index 724662b..3aa3d0a 100755 --- a/scripting/include/hns-match/modes/mode_knife.inl +++ b/scripting/include/hns-match/modes/mode_knife.inl @@ -58,7 +58,9 @@ public kniferound_roundend(bool:win_ct) { pickMenu(g_iCaptainPick, true); - set_task(1.0, "WaitPick"); + if (g_iSettings[RANDOMPICK] == 1) { + set_task(1.0, "WaitPick"); + } } case MATCH_TEAMKNIFE: { if (win_ct) { diff --git a/scripting/include/hns-match/modes/mode_mix.inl b/scripting/include/hns-match/modes/mode_mix.inl index 507c573..b9a3376 100755 --- a/scripting/include/hns-match/modes/mode_mix.inl +++ b/scripting/include/hns-match/modes/mode_mix.inl @@ -28,7 +28,7 @@ public mix_start() { loadMapCFG(); new iPlayers[MAX_PLAYERS], iNum; - get_players(iPlayers, iNum, "e", "TERRORIST"); + get_players(iPlayers, iNum, "ce", "TERRORIST"); g_eMatchInfo[e_mTeamSizeTT] = iNum; g_eMatchInfo[e_mTeamSize] = get_num_players_in_match(); @@ -303,7 +303,7 @@ public mix_roundend(bool:win_ct) { g_eMatchInfo[e_iRoundsPlayed][g_isTeamTT]++; new iPlayers[MAX_PLAYERS], iNum; - get_players(iPlayers, iNum, "ahe", "CT"); + get_players(iPlayers, iNum, "ache", "CT"); if (!iNum) { new Float:roundtime = get_round_time() * 60.0; diff --git a/scripting/include/hns-match/modes/mode_zombie.inl b/scripting/include/hns-match/modes/mode_zombie.inl index 290655d..1a5cef0 100644 --- a/scripting/include/hns-match/modes/mode_zombie.inl +++ b/scripting/include/hns-match/modes/mode_zombie.inl @@ -41,7 +41,7 @@ public zm_roundend(bool:win_ct) { public zm_set_teams() { new iPlayers[MAX_PLAYERS], iNum - get_players(iPlayers, iNum, "h"); + get_players(iPlayers, iNum, "ch"); for (new i; i < iNum; i++) { new iPlayer = iPlayers[i]; @@ -56,7 +56,7 @@ public zm_set_teams() { GetRandomAlive() { static iPlayers[MAX_PLAYERS], iTTNum - get_players(iPlayers, iTTNum, "he", "TERRORIST"); + get_players(iPlayers, iTTNum, "che", "TERRORIST"); new iAlivePlayers[MAX_PLAYERS], iAliveNum; @@ -109,7 +109,7 @@ public zm_player_leave(id) { public checkZombie() { new iPlayers[MAX_PLAYERS], iNum; - get_players(iPlayers, iNum, "he", "CT"); + get_players(iPlayers, iNum, "che", "CT"); if (!iNum) { set_zombie(); diff --git a/scripting/include/hns-match/user.inc b/scripting/include/hns-match/user.inc index 85a4ec4..adeb608 100644 --- a/scripting/include/hns-match/user.inc +++ b/scripting/include/hns-match/user.inc @@ -111,7 +111,7 @@ setTeam(id, TeamName:iTeam) { stock get_num_players_in_match() { new iPlayers[MAX_PLAYERS], iNum; - get_players(iPlayers, iNum, "h"); + get_players(iPlayers, iNum, "ch"); new numGameplr; for (new i; i < iNum; i++) { new tempid = iPlayers[i];