- Ошибка
-
Не работает timeleft,nextmap, thetime, currentmap
- ОС
- 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-r v1.3.0.128
- Список метамодулей
-
Metamod-r v1.3.0.128
- Список плагинов
-
name version author file status
[ 1] Admin Loader 2.9 neygomon admin_loader.am running
[ 2] FreshBan 1.0.5b kanagava fresh_bans.amxx running
[ 3] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 4] Admin Help 1.9.0.5271 AMXX Dev Team adminhelp.amxx running
[ 5] Slots Reservation 1.8.3-Re AMXX Dev Team adminslots.amxx running
[ 6] Menus Front-End 1.9.0.5271 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.7 neugomon players_menu.am running
[ 9] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0.5271 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0.5271 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0.5271 AMXX Dev Team antiflood.amxx running
[ 13] Info. Messages 1.9.0.5271 AMXX Dev Team imessage.amxx running
[ 14] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
[ 15] Pause Plugins 1.9.0.5271 AMXX Dev Team pausecfg.amxx running
[ 16] Stats Configuration 1.9.0.5271 AMXX Dev Team statscfg.amxx running
[ 17] Restrict Weapons 1.9.0.5271 AMXX Dev Team restmenu.amxx running
[ 18] FlashBang DynLight 1.3 [REAPI neugomon flashbang_dynli running
[ 19] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 20] BhopHack Detector 0.1 Mistrick bhophack_detect running
[ 21] Team Select 1.6.0 F@nt0M teamselect.amxx running
[ 22] High Ping Kicker 1.6 UFPS.Team high_ping_kicke running
[ 23] c4 0.1 Artemka c4.amxx running
[ 24] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 25] Knife Duel with Telepo 1.2 neygomon knife_duel.amxx running
[ 26] Welcome in the Server 0.1 pUzzlik re_welcome_msg. running
[ 27] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 28] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 29] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 30] Autochange de_dust2 1.0 Artem P. autochange_de_d running
[ 31] Check Admin & Vip 2.0 Leo_[BH] check_admin_vip running
[ 32] Damager 2.0 Prayer damager.amxx running
[ 33] ResetScore 1.0 Leo_[BH] resetscore_reap running
[ 34] Killa HP 1.6 jas0n killa_hp.amxx running
[ 35] Instant AutoTeamBalanc 1.2.0 ConnorMcLeod instant_autotea running
[ 36] [ReAPI] Custom Models 1.6.1 neugomon custom_models.a running
[ 37] Screen Fade 0.1 neygomon screen_fade.amx running
[ 38] Nice Live 1.0 sector nice_live.amxx running
[ 39] [ReAPI] TopRoundDamage 1.0.6 Dager* *.* -G- damage_round.am running
[ 40] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx running
[ 41] Parachute for ALL [ReA 3.0 Leo_[BH] parachute_for_a running
[ 42] C4 Timer on roundtime 0.3.3a neygomon c4timer.amxx running
[ 43] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 44] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 45] Killing Particles 1.01 metallicawOw KP_FIX.amxx running
[ 46] Lite Kill Assist 1.17 neygomon lite_kill_assis running
[ 47] VIP Custom Weapons 1.0 Vaqtincha vip_custom_weap running
[ 48] Reklama 20.05.2020 mx?! reklama.amxx running
[ 49] SpecList by HENRI(_)LL 3.0 HENRI(_)LLOYD speclist_remake running
[ 50] VoteBan Menu 1.1 Author + ApXuTek voteban_menu.am running
[ 51] Kill Manager Sound 1.3 ShaTalKiN kmansound.amxx running
[ 52] [ReAPI] Hint blocker 0.1.0 F@tn0M reapi_hint_bloc running
[ 53] Top Awards 1.0 Dom1no_[KZ] top_awards1.amx running
[ 54] Simple Grenade Trail 1.0 seroff granade_trail.a running
[ 55] FreeAmmoEveryRound 0.1 SHLAKBAUM freeammoeveryro running
[ 56] Ultimate Flags 29.10.19 by detu mou ultimate_flags. running
[ 57] Spectator Bots 2.1 SISA spectator_bots. running
[ 58] Descriptive 'Fire in t 0.1 VEN descriptive_fir running
[ 59] Lite Translit 2.8 neygomon lite_translit_c running
[ 60] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 61] Advanced Experience Sy 0.5 Vega serfreeman1337 aes_main.amxx running
[ 62] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx_cstr running
[ 63] AES: StatsX Info Rank 0.1 serfreeman1337 aes_statsx_rank running
[ 64] AES: CStrike Addon 0.5 Vega serfreeman1337 aes_exp_cstrike running
[ 65] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am running
[ 66] AES: Admin Tools 0.5 Vega serfreeman1337 aes_exp_editor. running
[ 67] AES: Bonus System 0.5 Vega serfreeman1337 aes_bonus_syste running
[ 68] AES: Bonus CSTRIKE 0.5 Vega serfreeman1337 aes_bonus_cstri running
[ 69] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx.amxx running
[ 70] V.I.P Custom KNIFE 1.0.0 Vaqtincha custom_knife.am running
[ 71] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a running
[ 72] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx running
[ 73] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx running
[ 74] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx running
[ 75] Block Pickup Gold 0.1 Vaqtincha blockpickupgold running
[ 76] Map Manager: Core 3.0.7 Mistrick map_manager_cor running
[ 77] Map Manager: Scheduler 0.1.5 Mistrick map_manager_sch running
[ 78] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 79] Map Manager: Nominatio 0.1.2 Mistrick map_manager_nom running
[ 80] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 81] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 82] Map Manager: Effects 0.0.9 Mistrick map_manager_eff running
[ 83] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
- Автор плагина
- Mistrick
- Версия плагина
- 3.0.7
- Исходный код
-
#include <amxmodx>
#include <map_manager>
#include <map_manager_scheduler>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif
#define PLUGIN "Map Manager: Informer"
#define VERSION "0.0.5"
#define AUTHOR "Mistrick"
#pragma semicolon 1
#define get_num(%0) get_pcvar_num(g_pCvars[%0])
enum Cvars {
TIMELIMIT,
WINLIMIT,
MAXROUNDS,
NEXTMAP,
EXTENDED_TYPE
};
new g_pCvars[Cvars];
new g_iTeamScore[2];
new g_sCurMap[MAPNAME_LENGTH];
new g_sPrefix[48];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say timeleft", "clcmd_timeleft");
register_clcmd("say thetime", "clcmd_thetime");
register_clcmd("say nextmap", "clcmd_nextmap");
register_clcmd("say currentmap", "clcmd_currentmap");
register_event("TeamScore", "event_teamscore", "a");
get_mapname(g_sCurMap, charsmax(g_sCurMap));
}
public plugin_cfg()
{
g_pCvars[TIMELIMIT] = get_cvar_pointer("mp_timelimit");
g_pCvars[WINLIMIT] = get_cvar_pointer("mp_winlimit");
g_pCvars[MAXROUNDS] = get_cvar_pointer("mp_maxrounds");
g_pCvars[NEXTMAP] = get_cvar_pointer("amx_nextmap");
g_pCvars[EXTENDED_TYPE] = get_cvar_pointer("mapm_extended_type");
mapm_get_prefix(g_sPrefix, charsmax(g_sPrefix));
}
public event_teamscore()
{
new team[2]; read_data(1, team, charsmax(team));
g_iTeamScore[(team[0] == 'C') ? 0 : 1] = read_data(2);
}
public clcmd_timeleft(id)
{
if(is_vote_finished()) {
client_print_color(0, print_team_default, "%s^1 %L", g_sPrefix, LANG_PLAYER, "MAPM_CHANGELEVEL_NEXTROUND");
return;
}
new win_limit = get_num(WINLIMIT);
new max_rounds = get_num(MAXROUNDS);
// TODO: need subtract left_wins/left_rounds if mapm_change_type 0 or 1
if((win_limit || max_rounds) && get_num(EXTENDED_TYPE) == EXTEND_ROUNDS) {
new text[128], len;
len = formatex(text, charsmax(text), "%L ", LANG_PLAYER, "MAPM_TIME_TO_END");
if(win_limit) {
new left_wins = win_limit - max(g_iTeamScore[0], g_iTeamScore[1]);
len += formatex(text[len], charsmax(text) - len, "%d %L", left_wins, LANG_PLAYER, "MAPM_WINS");
}
if(win_limit && max_rounds) {
len += formatex(text[len], charsmax(text) - len, " %L ", LANG_PLAYER, "MAPM_TIMELEFT_OR");
}
if(max_rounds) {
new left_rounds = max_rounds - g_iTeamScore[0] - g_iTeamScore[1];
len += formatex(text[len], charsmax(text) - len, "%d %L", left_rounds, LANG_PLAYER, "MAPM_ROUNDS");
}
client_print_color(0, print_team_default, "%s^1 %s.", g_sPrefix, text);
} else {
if (get_num(TIMELIMIT)) {
new a = get_timeleft();
client_print_color(0, id, "%s^1 %L:^3 %d:%02d", g_sPrefix, LANG_PLAYER, "MAPM_TIME_TO_END", (a / 60), (a % 60));
} else {
if(is_vote_will_in_next_round()) {
client_print_color(0, print_team_default, "%s^1 %L", g_sPrefix, LANG_PLAYER, "MAPM_VOTE_IN_NEXTROUND");
} else {
client_print_color(0, print_team_default, "%s^1 %L", g_sPrefix, LANG_PLAYER, "MAPM_NO_TIMELIMIT");
}
}
}
}
public clcmd_thetime(id)
{
new curtime[64]; get_time("%Y/%m/%d - %H:%M:%S", curtime, charsmax(curtime));
client_print_color(0, print_team_default, "%s^3 %L", g_sPrefix, LANG_PLAYER, "MAPM_THETIME", curtime);
}
public clcmd_nextmap(id)
{
if(is_vote_finished()) {
new map[MAPNAME_LENGTH]; get_pcvar_string(g_pCvars[NEXTMAP], map, charsmax(map));
client_print_color(0, id, "%s^1 %L ^3%s^1.", g_sPrefix, LANG_PLAYER, "MAPM_NEXTMAP", map);
} else {
client_print_color(0, id, "%s^1 %L ^3%L^1.", g_sPrefix, LANG_PLAYER, "MAPM_NEXTMAP", LANG_PLAYER, "MAPM_NOT_SELECTED");
}
}
public clcmd_currentmap(id)
{
client_print_color(0, id, "%s^1 %L", g_sPrefix, LANG_PLAYER, "MAPM_CURRENT_MAP", g_sCurMap);
}
rtv работает через /rtv, просто так rtv не работает, ну и основная проблема в том что не выводит timeleft и nextmap список модулей
15 Янв 2021
Fun 1.9.0.5271 AMX Mod X Dev Team running
Engine 1.9.0.5271 AMX Mod X Dev Team running
nVault 1.9.0.5271 AMX Mod X Dev Team running
CStrike 1.9.0.5271 AMX Mod X Dev Team running
CSX 1.9.0.5271 AMX Mod X Dev Team running
Ham Sandwich 1.9.0.5271 AMX Mod X Dev Team running
ReAPI 5.18.0.203 Asmodai & s1lent running
MySQL 1.9.0.5271 AMX Mod X Dev Team running
FakeMeta 1.9.0.5271 AMX Mod X Dev Team running
ReAimDetector 0.2.2 ReHLDS Team running
RegEx 1.9.0.5271 AMX Mod X Dev Team running
Engine 1.9.0.5271 AMX Mod X Dev Team running
nVault 1.9.0.5271 AMX Mod X Dev Team running
CStrike 1.9.0.5271 AMX Mod X Dev Team running
CSX 1.9.0.5271 AMX Mod X Dev Team running
Ham Sandwich 1.9.0.5271 AMX Mod X Dev Team running
ReAPI 5.18.0.203 Asmodai & s1lent running
MySQL 1.9.0.5271 AMX Mod X Dev Team running
FakeMeta 1.9.0.5271 AMX Mod X Dev Team running
ReAimDetector 0.2.2 ReHLDS Team running
RegEx 1.9.0.5271 AMX Mod X Dev Team running
В этой теме было размещено решение! Перейти к решению.