#if defined FUNCTION_NIGHTMODE
if(g_bNightMode)
{
new iNightSize = ArraySize(g_aNightMaps);
g_iMenuItemsCount = min(min(g_bCurMapInNightMode ? iNightSize - 1 : iNightSize, SELECT_MAPS), 8);
for(new Item, iRandomMap, szMapName[32]; Item < g_iMenuItemsCount; Item++)
{
do
{
iRandomMap = random_num(0, iNightSize - 1);
ArrayGetString(g_aNightMaps, iRandomMap, szMapName, charsmax(szMapName));
}
while(is_map_in_menu_by_string(szMapName) || equali(szMapName, g_szCurrentMap));
formatex(g_eMenuItems[Item][v_MapName], charsmax(g_eMenuItems[][v_MapName]), szMapName);
}
ForwardPreStartVote();
return 0;
}
#endif