Fork update 1.2a by Leo_[BH]
• The file maps.ini replaced mapcycle.txt
This fork update publish on https://vk.com/cs_rain
Original author: BOYSplayCS
Information about this plugin can be found at:
http://forums.alliedmods.net/showthread.php?t=102250 (old version)
Thank you to the following people for helping:
Exolent - Major Coding Help
new const maps_list_file[] = "addons/amxmodx/configs/maps.ini"
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_random_map", "eventChangeMap", ADMIN_MAP, "<randomly change the map>");
public eventChangeMap(id, level, cid)
if (cmd_access(id, level, cid, 1))
if (GetRandomMap(maps_list_file, szMap, charsmax(szMap)))
client_cmd(id, "amx_map %s", szMap);
console_print(id, MSG_ERRORLOG);
GetRandomMap(const szMapFile[ ], szReturn[ ], const iLen)
new iFile = fopen(szMapFile, "rt");
new Array:aMaps = ArrayCreate(64);
new Trie:tArrayPos = TrieCreate( );
static szData[128], szMap[64];
fgets(iFile, szData, charsmax(szData));
parse(szData, szMap, charsmax(szMap));
if (is_map_valid(szMap) && !TrieKeyExists(tArrayPos, szMap))
ArrayPushString(aMaps, szMap);
TrieSetCell(tArrayPos, szMap, iTotal);
ArrayGetString(aMaps, random(iTotal), szReturn, iLen);
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
// Модификация плагина: Leo_[BH]
// Мои плагины: http://vk.com/cs_rain
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// Я предоставляю услуги в сфере Amx Mod X
// Написание плагинов на заказ: https://goo.gl/forms/7DwrBdaTnc0pJRqy2
// Создание сборки сервера под ключ: https://goo.gl/forms/GIyvSAw1IJ48szDn2
// Магазин плагинов: https://vk.com/cs_rain
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~