nextmap

Сообщения
143
Реакции
3
Предупреждения
100
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
Ошибка
[nextmap.amxx] WARNING: Couldn't find a valid map or the file doesn't exist (file "mapcycle.txt")
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5271
Билд
ReHLDS version: 3.8.0.702-dev
ReGamedll
ReGameDLL version: 5.20.0.492-dev
Версия Metamod
Metamod-P (mm-p) v37
Список метамодулей
[ 1] Reunion          RUN   -    reunion_mm_i386.  v0.1.0.9  ini   Start Never
[ 2] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 3] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 4] Revoice RUN - revoice_mm_i386. v0.1.0.3 ini Start Never
[ 5] WHBlocker RUN - whblocker_mm_i38 v1.5.697 ini Chlvl ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 7] ReAimDetector RUN - reaimdetector_am v0.2.2 pl2 ANY Never
[ 8] AMXX CRACKER RUN - amxx_cracker_amx v1.0 pl2 ANY ANY
[ 9] GeoIP RUN - geoip_amxx_i386. v1.9.0.5 pl2 ANY ANY
[10] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl2 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl2 ANY ANY
[12] Engine RUN - engine_amxx_i386 v1.9.0.5 pl2 ANY ANY
[13] ReAPI RUN - reapi_amxx_i386. v5.19.0. pl2 ANY Never
[14] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl2 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl2 ANY ANY
[16] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl2 ANY ANY
[17] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl2 ANY ANY
17 plugins, 17 running
Список плагинов
[  1] AMXBans: Core           Gm 1.6      Larte Team        amxbans_core.am  running  
[ 2] AMXBans: Main Gm 1.6 Larte Team amxbans_main.am running
[ 3] [190] Screen Player 20.06.06 SKAJIbnEJIb screen_player.a running
[ 4] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 5] Advanced Kill Assists 1.3c Xelson next21_kill_ass running
[ 6] [190] Army Ranks Ultim 20.06.06 SKAJIbnEJIb army_ranks_ulti running
[ 7] [190] CsStats MySQL 20.06.06 SKAJIbnEJIb csstats_mysql.a running
[ 8] [190] AR Bets 20.06.06 SKAJIbnEJIb ar_bets.amxx running
[ 9] [190] Chat Controller 20.06.06 SKAJIbnEJIb chat_controller running
[ 10] [190] Chat RBS 20.06.06 SKAJIbnEJIb chat_rbs.amxx running
[ 11] FreshBans 1.4.3b kanagava fresh_bans_143_ running
[ 12] WebHS 0.1 kanagava fb_web_online.a running
[ 13] [182] VoteBan L4D 17.10.30 Sanlerus voteban_l4d.amx running
[ 14] [190] No Team Flash 20.06.06 SKAJIbnEJIb NoTeamFlash.amx running
[ 15] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 16] Slots Reservation 1.9.0.5271 AMXX Dev Team adminslots.amxx running
[ 17] Multi-Lingual System 1.9.0.5271 AMXX Dev Team multilingual.am running
[ 18] Menus Front-End 1.9.0.5271 AMXX Dev Team menufront.amxx running
[ 19] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 20] Players Menu 1.9.0.5271 AMXX Dev Team plmenu.amxx running
[ 21] Teleport Menu 1.9.0.5271 AMXX Dev Team telemenu.amxx running
[ 22] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 23] Plugin Menu 1.9.0.5271 AMXX Dev Team pluginmenu.amxx running
[ 24] Admin Chat 1.9.0.5271 AMXX Dev Team adminchat.amxx running
[ 25] Scrolling Message 1.9.0.5271 AMXX Dev Team scrollmsg.amxx running
[ 26] Info. Messages 1.9.0.5271 AMXX Dev Team imessage.amxx running
[ 27] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
[ 28] NextMap 1.9.0.5271 AMXX Dev Team nextmap.amxx running
[ 29] Nextmap Chooser 1.9.0.5271 AMXX Dev Team mapchooser.amxx running
[ 30] TimeLeft 1.9.0.5271 AMXX Dev Team timeleft.amxx running
[ 31] Pause Plugins 1.9.0.5271 AMXX Dev Team pausecfg.amxx running
[ 32] Stats Configuration 20.06.06 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 33] Restrict Weapons 1.9.0.5271 AMXX Dev Team restmenu.amxx running
[ 34] [190] StatsX RBS 20.06.06 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 35] CS Misc. Stats 1.9.0.5271 AMXX Dev Team miscstats.amxx running
[ 36] unknown unknown unknown ultimate_weapon running
[ 37] [190] VIP RBS 20.07.20 SKAJIbnEJIb vip_rbs.amxx running
[ 38] Advanced Ultimate Weap 0.1.0b steelzzz auw.amxx running
[ 39] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 40] No Players Map 1.03 neygomon no_players_map. stopped
[ 41] [190] AR Vampire 20.06.06 SKAJIbnEJIb ar_vampire.amxx running
[ 42] Parachute 1.0 maeStro parachute.amxx running
[ 43] [190] Ultimate Models 20.06.06 SKAJIbnEJIb ultimate_models running
[ 44] Ping Checker 26.0.1 RC1 h1k3 ping_checker.am running
[ 45] Map Spawns Editor 1.0.16 iG_os map_spawns_edit running
[ 46] AntiSpam FlashLight 1.0 Leo_[BH] flashlight_no_s running
[ 47] Mode 2x2 2.5re s1lent mode.amxx running
[ 48] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 49] Auto Restart KNIFE 2.0 Leo_[BH] auto_rr.amxx running
[ 50] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx running
[ 51] Advanced Bullet Damage 1.0 Sn!ff3r/Vaqtinch damager.amxx running
[ 52] [ReAPI] Healthnade 0.0.2 F@nt0M reapi_healthnad running
[ 53] ResetScore 1.0 Leo_[BH] resetscore_reap running
[ 54] [182] Crux Ansata 17.10.30 Sanlerus crux_ansata.amx running
[ 55] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 56] FPS Meter 1.1 neygomon fps.amxx running
[ 57] TOP VIP (Auto Set) 1.0a Leo_[BH] top_vip.amxx running
[ 58] Fake Ping 1.1 MeRcyLeZZ/gyxoBk FakePing.amxx running
[ 59] DeathGift 1.2.1 ArKaNeMaN DeathGift.amxx running
[ 60] [DG] MoreBonuses 1.0 ArKaNeMaN dgMoreBonuses.a running
[ 61] [DG][MB] More Function 1.1 ArKaNeMaN dgmbMoreFuncs.a running
Автор плагина
AMXX Dev Team
Версия плагина
1.9.0.5271
Исходный код
// vim: set ts=4 sw=4 tw=99 noet:
//
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
// Copyright (C) The AMX Mod X Development Team.
//
// This software is licensed under the GNU General Public License, version 3 or higher.
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
// https://alliedmods.net/amxmodx-license

//
// NextMap Plugin
//

#include <amxmodx>

// WARNING: If you comment this line make sure
// that in your mapcycle file maps don't repeat.
// However the same map in a row is still valid.
#define OBEY_MAPCYCLE

new g_nextMap[32]
new g_mapCycle[32]
new g_pos
new g_currentMap[32]

// pcvars
new g_mp_friendlyfire, g_mp_chattime
new g_amx_nextmap

public plugin_init()
{
register_plugin("NextMap", AMXX_VERSION_STR, "AMXX Dev Team")
register_dictionary("nextmap.txt")
register_event("30", "changeMap", "a")
register_clcmd("say nextmap", "sayNextMap", 0, "- displays nextmap")
register_clcmd("say currentmap", "sayCurrentMap", 0, "- display current map")

g_amx_nextmap = register_cvar("amx_nextmap", "", FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
g_mp_chattime = get_cvar_pointer("mp_chattime")
g_mp_friendlyfire = get_cvar_pointer("mp_friendlyfire")
if( g_mp_friendlyfire )
{
register_clcmd("say ff", "sayFFStatus", 0, "- display friendly fire status")
}

get_mapname(g_currentMap, charsmax(g_currentMap))

new szString[40], szString2[32], szString3[8]

get_localinfo("lastmapcycle", szString, charsmax(szString))
parse(szString, szString2, charsmax(szString2), szString3, charsmax(szString3))

get_cvar_string("mapcyclefile", g_mapCycle, charsmax(g_mapCycle))

if (!equal(g_mapCycle, szString2))
g_pos = 0 // mapcyclefile has been changed - go from first
else
g_pos = str_to_num(szString3)

readMapCycle(g_mapCycle, g_nextMap, charsmax(g_nextMap))
set_pcvar_string(g_amx_nextmap, g_nextMap)
formatex(szString, charsmax(szString), "%s %d", g_mapCycle, g_pos) // save lastmapcycle settings
set_localinfo("lastmapcycle", szString)
}

getNextMapName(szArg[], iMax)
{
new len = get_pcvar_string(g_amx_nextmap, szArg, iMax)

if (ValidMap(szArg)) return len
len = copy(szArg, iMax, g_nextMap)
set_pcvar_string(g_amx_nextmap, g_nextMap)

return len
}

public sayNextMap()
{
new name[32]

getNextMapName(name, charsmax(name))
client_print(0, print_chat, "%L %s", LANG_PLAYER, "NEXT_MAP", name)
}

public sayCurrentMap()
{
client_print(0, print_chat, "%L: %s", LANG_PLAYER, "PLAYED_MAP", g_currentMap)
}

public sayFFStatus()
{
client_print(0, print_chat, "%L: %L", LANG_PLAYER, "FRIEND_FIRE", LANG_PLAYER, get_pcvar_num(g_mp_friendlyfire) ? "ON" : "OFF")
}

public delayedChange(param[])
{
if (g_mp_chattime) {
set_pcvar_float(g_mp_chattime, get_pcvar_float(g_mp_chattime) - 2.0)
}
engine_changelevel(param)
}

public changeMap()
{
new string[32]
new Float:chattime = g_mp_chattime ? get_pcvar_float(g_mp_chattime) : 10.0; // mp_chattime defaults to 10 in other mods

if (g_mp_chattime) {
set_pcvar_float(g_mp_chattime, chattime + 2.0) // make sure mp_chattime is long
}
new len = getNextMapName(string, charsmax(string)) + 1
set_task(chattime, "delayedChange", 0, string, len) // change with 1.5 sec. delay
}

new g_warning[] = "WARNING: Couldn't find a valid map or the file doesn't exist (file ^"%s^")"

stock bool:ValidMap(mapname[])
{
if ( is_map_valid(mapname) )
{
return true;
}
// If the is_map_valid check failed, check the end of the string
new len = strlen(mapname) - 4;

// The mapname was too short to possibly house the .bsp extension
if (len < 0)
{
return false;
}
if ( equali(mapname[len], ".bsp") )
{
// If the ending was .bsp, then cut it off.
// the string is byref'ed, so this copies back to the loaded text.
mapname[len] = '^0';

// recheck
if ( is_map_valid(mapname) )
{
return true;
}
}

return false;
}

#if defined OBEY_MAPCYCLE
readMapCycle(szFileName[], szNext[], iNext)
{
new b, i = 0, iMaps = 0
new szBuffer[32], szFirst[32]

if (file_exists(szFileName))
{
while (read_file(szFileName, i++, szBuffer, charsmax(szBuffer), b))
{
if (!isalnum(szBuffer[0]) || !ValidMap(szBuffer)) continue

if (!iMaps)
copy(szFirst, charsmax(szFirst), szBuffer)

if (++iMaps > g_pos)
{
copy(szNext, iNext, szBuffer)
g_pos = iMaps
return
}
}
}

if (!iMaps)
{
log_amx(g_warning, szFileName)
copy(szNext, iNext, g_currentMap)
}
else
copy(szNext, iNext, szFirst)
g_pos = 1
}

#else

readMapCycle(szFileName[], szNext[], iNext)
{
new b, i = 0, iMaps = 0
new szBuffer[32], szFirst[32]

new a = g_pos

if (file_exists(szFileName))
{
while (read_file(szFileName, i++, szBuffer, charsmax(szBuffer), b))
{
if (!isalnum(szBuffer[0]) || !ValidMap(szBuffer)) continue

if (!iMaps)
{
iMaps = 1
copy(szFirst, charsmax(szFirst), szBuffer)
}

if (iMaps == 1)
{
if (equali(g_currentMap, szBuffer))
{
if (a-- == 0)
iMaps = 2
}
} else {
if (equali(g_currentMap, szBuffer))
++g_pos
else
g_pos = 0

copy(szNext, iNext, szBuffer)
return
}
}
}

if (!iMaps)
{
log_amx(g_warning, szFileName)
copy(szNext, iNext, g_currentMap)
}
else
copy(szNext, iNext, szFirst)

g_pos = 0
}
#endif
что это такое ?
16 Янв 2021
это то что нет списка карт в файле mapcycle.txt ? думал тем самым отключить смену карты .
 
В этой теме было размещено решение! Перейти к решению.

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

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