night_maplist Не отключается ночной режим

Сообщения
194
Реакции
43
Помог
4 раз(а)
Ошибка
Не отключается ночной режим
ОС
Linux
Amx Mod X
1.9.0
Билд
ReHLDS версии: 3.7.0.695
ReGamedll
RegameDLL версии: 5.15.0.458
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.92c ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] Revoice RUN - revoice_mm_i386.so v0.1.0.34 ini Start Never
[ 5] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 6] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5263 ini Start ANY
[ 7] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 8] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 9] ReAPI RUN - reapi_amxx_i386.so v5.11.0.189-dev pl6 ANY Never
[10] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl6 ANY Never
[11] MySQL RUN - mysql_amxx_i386.so v1.9.0.5263 pl6 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5263 pl6 ANY ANY
[13] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5263 pl6 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5263 pl6 ANY ANY
[15] Engine RUN - engine_amxx_i386.so v1.9.0.5263 pl6 ANY ANY
15 plugins, 15 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 2] Trial Access 05.07.19 mx?! trial_access.am running
[ 3] Admin Loader 3.5 neygomon admin_loader.am running
[ 4] FreshBans 1.4.3b kanagava fresh_bans.amxx running
[ 5] ScreenMaker 1.1 neygomon screen_maker.am running
[ 6] Ultimate Chats Control 5.2 neygomon ucc.amxx running
[ 7] Admin Commands 1.9.0.5263 AMXX Dev Team admincmd.amxx running
[ 8] Menus Front-End 1.5 neugomon menufront.amxx running
[ 9] Commands Menu 1.9.0.5263 AMXX Dev Team cmdmenu.amxx running
[ 10] New Kick Menu 1.2.8 Radius newkickmenu.amx running
[ 11] Players Menu 1.7 neugomon plmenu.amxx running
[ 12] Night MapList 1.1 neygomon night_maplist. running
[ 13] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 14] Admin Chat 1.9.0.5263 AMXX Dev Team adminchat.amxx running
[ 15] Player Votes 1.1 neugomon player_votes.am running
[ 16] Night VIP 0.1 maFFyoZZyk night_vip.amxx running
[ 17] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am debug
[ 18] Stats Configuration 1.9.0.5263 AMXX Dev Team statscfg.amxx running
[ 19] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 20] Say Rs, Me, Hp 1.1 AcE re_sayme.amxx running
[ 21] Re C4 Timer [ON] 1.0 AcE re_c4_timer.amx running
[ 22] Items Restrict 1.0 ReHLDS Team items_restrict. running
[ 23] Admin ESP 0.3 miRror | Radius admin_esp_mini. running
[ 24] Advertising Manager 1.0 Javekson advertising_man running
[ 25] AFK Control ReNew 1.3 neygomon afk_control.amx running
[ 26] AuthEmu API 1.0 Dev-MS Team authemu.amxx running
[ 27] Lite Recoder 1.0.1 neygomon amx_demorec.amx running
[ 28] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx debug
[ 29] Kick on Change Name 0.1 w0w | AcE change_name.amx running
[ 30] Damager 0.0.6 steelzzz damager.amxx running
[ 31] [ReAPI] Lite TeamBalan 2.3 neugomon lite_balancer.a running
[ 32] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 33] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash.a running
[ 34] [ReAPI] KiLL Assist 1.1 PRoSToTeM@ kill_assist_rea running
[ 35] Mode 2x2 2.5re s1lent mode.amxx running
[ 36] Master Servers Check 5.3 Javekson ms_check.amxx running
[ 37] Custom Smoke 1.09 bionext custom_smoke.am running
[ 38] [ReAPI] Parachute 1.1 ReHLDS Team parachute.amxx running
[ 39] Ping Control 1.31f neygomon ping_control_wo running
[ 40] [ReAPI] Block 'Fire in 0.0.1 sergrib reapi_block_FIT running
[ 41] [ReAPI] Slay Loosers 1.1 neugomon reapi_slayloose running
[ 42] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 43] Steam Bonus 1.1 ill+F@nToM steam_bonus.amx running
[ 44] Show Admins 1.0 TBONTB show_admins.amx running
[ 45] TOP VIP (Auto Set) 2.0 Leo_[BH] & maFFy top_vip.amxx running
[ 46] Vampire 0.1 F@nt0M vampire.amxx running
[ 47] [ReAPI] Random Weapons 2.4.9+1 neugomon/h1k3 warmup.amxx running
[ 48] Chat Manager 1.1.2-16 Mistrick chatmanager.amx running
[ 49] Map Manager: Core 3.0.5 Mistrick map_manager_cor running
[ 50] Map Manager: Scheduler 0.1.3 Mistrick map_manager_sch running
[ 51] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 52] Map Manager: Nominatio 0.1.2 Mistrick map_manager_nom running
[ 53] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 54] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 55] Map Manager: Effects 0.0.9 Mistrick map_manager_eff running
[ 56] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 57] [ReVIP] System Core 2.5 full pUzzlik re_vip_core.amx running
[ 58] [ReVIP] Menu 2.5 full pUzzlik re_vip_menu.amx running
[ 59] [ReVIP] Tab Info 2.5 full pUzzlik re_vip_tab_info running
[ 60] [ReVIP] Custom Shop 2.5 full pUzzlik re_vip_shop.amx running
[ 61] [ReVIP] Custom AK-47 2.5 full pUzzlik re_vip_custom_a running
[ 62] [ReVIP] Custom M4A1 2.5 full pUzzlik re_vip_custom_m running
[ 63] [ReVIP] Custom AWP 2.5 full pUzzlik re_vip_custom_a running
[ 64] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 65] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 66] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 67] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 68] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 69] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
69 plugins, 69 running
Автор плагина
neygomon
Версия плагина
1.1
Исходный код
#include amxmodx
#if AMXX_VERSION_NUM < 183
#define engine_changelevel(%0) server_cmd("changelevel %s", %0)
#endif

new g_pTimeLimit, g_iOldTime, Float:g_flResetTime;
new bool:g_bNight;

enum _:DATA
{
NAME[32],
FROM,
TO
}
new g_aMaps[128][DATA];
new g_iCountMaps;

public plugin_init()
{
#define VERSION "1.1"
register_plugin("Night MapList", VERSION, "neygomon");
register_cvar("light_maplist", VERSION, FCVAR_SERVER | FCVAR_SPONLY);

register_event("TextMsg", "eGameCommencing", "a", "2=#Game_Commencing", "2=#Game_will_restart_in");
register_event("HLTV", "eRoundStart", "a", "1=0", "2=0");

register_clcmd("say rtv", "RtvHook");
register_clcmd("say_team rtv", "RtvHook");
register_clcmd("say /rtv", "RtvHook");
register_clcmd("say_team rtv", "RtvHook");
register_clcmd("amx_rtv", "RtvHook");

g_pTimeLimit = get_cvar_pointer("mp_timelimit");
}

public plugin_cfg()
{
new fHand = fopen("addons/amxmodx/configs/night_maps.ini", "rt");
if(!fHand) set_fail_state("File ^"addons/amxmodx/configs/night_maps.ini^" not found OR not read!");
new buffer[64], sFrom[6], sTo[6];
new sTemp[4][3];
new iFrom, iTo;
while(!feof(fHand))
{
fgets(fHand, buffer, charsmax(buffer)); trim(buffer);
if(!buffer[0] || buffer[0] == ';') continue;
if(parse(buffer, g_aMaps[g_iCountMaps][NAME], charsmax(g_aMaps[][NAME]), sFrom, charsmax(sFrom), sTo, charsmax(sTo)))
{
replace_all(sFrom, charsmax(sFrom), ":", " ");
replace_all(sTo, charsmax(sTo), ":", " ");
if(parse(sFrom, sTemp[0], charsmax(sTemp[]), sTemp[1], charsmax(sTemp[])) &&
parse(sTo, sTemp[2], charsmax(sTemp[]), sTemp[3], charsmax(sTemp[])))
{
iFrom = str_to_num(sTemp[0]) * 60 * 60 + str_to_num(sTemp[1]) * 60;
iTo = str_to_num(sTemp[2]) * 60 * 60 + str_to_num(sTemp[3]) * 60;

g_aMaps[g_iCountMaps][FROM] = iFrom;
g_aMaps[g_iCountMaps][TO] = (iFrom > iTo) ? (86400 - iFrom) + iFrom + iTo : iTo;

g_iCountMaps++;
}
}
}
if(!g_iCountMaps) set_fail_state("Maps not found OR invalid syntax file! Check ^"addons/amxmodx/configs/night_maps.ini^"");
}

public plugin_end()
if(g_iOldTime)
set_pcvar_num(g_pTimeLimit, g_iOldTime);

public client_putinserver(id)
if(g_bNight)
remove_user_flags(id, ADMIN_MAP|ADMIN_VOTE);

public eGameCommencing()
g_flResetTime = get_gametime();

public eRoundStart()
{
static CurHour, CurMinute; time(CurHour, CurMinute);
new CurTime = CurHour * 60 * 60 + CurMinute * 60;
if(g_aMaps[0][FROM] <= CurTime || CurTime < g_aMaps[g_iCountMaps-1][TO])
{
new IdMap = CheckMaps(CurTime); if(IdMap == -1) return;
static map[32]; if(!map[0]) get_mapname(map, charsmax(map));
if(!equal(map, g_aMaps[IdMap][NAME]))
{
engine_changelevel(g_aMaps[IdMap][NAME]);
return;
}
else if(!g_bNight)
{
g_bNight = true;
RemovePlayersFlags();
g_iOldTime = get_pcvar_num(g_pTimeLimit);
set_pcvar_num(g_pTimeLimit, 0);
}
}
else if(g_bNight)
{
set_pcvar_num(g_pTimeLimit, floatround(get_gametime() - g_flResetTime) / 60 + 5);
g_bNight = false;
}
}

public RtvHook(id)
{
if(g_bNight)
{
ChatColor(id, "^1[^4INFO^1] ^4RTV не работает в ^3Ночном режиме!");
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}

RemovePlayersFlags()
{
static players[32], pcount;
get_players(players, pcount, "ch");
for(new i; i < pcount; i++)
remove_user_flags(players[i], ADMIN_MAP|ADMIN_VOTE);
}

stock CheckMaps(cTime)
{
for(new i; i < g_iCountMaps; i++)
{
if(cTime >= g_aMaps[i][FROM] && cTime < g_aMaps[i][TO])
return i;
}
return -1;
}
/*
stock CheckMaps(cTime)
{
new iTemp;
for(new i; i < g_iCountMaps; i++)
{
if(cTime >= g_aMaps[i][FROM] && cTime < g_aMaps[i][TO])
iTemp = i;
}
return (iTemp > 0) ? iTemp : -1;
}
*/
stock ChatColor(const id, const szMessage[], any:...)
{
static pnum, players[32], szMsg[190], IdMsg;
vformat(szMsg, charsmax(szMsg), szMessage, 3);

if(!IdMsg) IdMsg = get_user_msgid("SayText");

if(id)
{
if(!is_user_connected(id)) return;
players[0] = id;
pnum = 1;
}
else get_players(players, pnum, "ch");

for(new i; i < pnum; i++)
{
message_begin(MSG_ONE, IdMsg, .player = players[i]);
write_byte(players[i]);
write_string(szMsg);
message_end();
}
}
Cтолкнулся с такой проблемой. Плагин входит в ночной режим, команды rtv, amx_vote блокируются, как и положено, но вот плагин не выходит из ночного режима. Время истекает, а сервер остается на последней карте ночного режима с timelimit 0. тему уже поднимали тока проблему не решили(
 
В этой теме было размещено решение! Перейти к решению.

Download all Attachments

Сообщения
194
Реакции
43
Помог
4 раз(а)
up вопрос еще актуален :sorry:
 
Сообщения
9
Реакции
2
Помог
1 раз(а)
Возможно идет конфликт с Map Manager by Mistrick, так как в нем присутствует свой ночной режим. Лучше отключи плагин от
neugomon и использую ночной режим Map Manager`a.
 
Сообщения
1,032
Реакции
828
Помог
10 раз(а)
С какого режима не выходит? с 23 до 4 часов? После 4 часов карта меняется на другую?
 
Сообщения
194
Реакции
43
Помог
4 раз(а)
Javekson, когда полностью заканчивается ночной режим он не выходить получается "de_dust2" "07:30" "09:00" в 09 ночной должен закончиться а он не заканчивается а продолжается
 
Сообщения
1,032
Реакции
828
Помог
10 раз(а)
SaHTuK, проверил на локалке, выходит, плагин выставил тайм лимит в 6 минут на выходе
 
Сообщения
194
Реакции
43
Помог
4 раз(а)
Javekson, хм странно все равно спасибо назначить у меня с чем то конфликтует буду проверять)
 
Сообщения
194
Реакции
43
Помог
4 раз(а)
апну тему все также Время истекает, а сервер остается на последней карте ночного режима с timelimit 0
 
Сообщения
3,582
Реакции
1,570
Помог
137 раз(а)

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу