- Ошибка
-
L 12/02/2018 - 04:30:27: [ReAPI] rg_set_user_team: player 7 is not connected
L 12/02/2018 - 04:30:27: [AMXX] Displaying debug trace (plugin "round_balancer.amxx", version "1.1")
L 12/02/2018 - 04:30:27: [AMXX] Run time error 10: native error (native "rg_set_user_team")
L 12/02/2018 - 04:30:27: [AMXX] [0] round_balancer.sma::fwdPlayerSpawnPre (line 136)
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5229
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
- ReGamedll
-
ReGameDLL version: 5.7.0.318-dev
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 2] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 3] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 4] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC3 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5229 ini Start ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 9] VTC AMXX API RUN - VoiceTranscoderApiProvider_amxx_i386.so v2017 RC pl5 ANY ANY
[10] ReAPI RUN - reapi_amxx_i386.so v5.6.0.160-dev pl5 ANY Never
[11] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl5 ANY Never
[12] MySQL RUN - mysql_amxx_i386.so v1.9.0.5229 pl5 ANY ANY
[13] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5229 pl5 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5229 pl5 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5229 pl5 ANY ANY
[16] Engine RUN - engine_amxx_i386.so v1.9.0.5229 pl5 ANY ANY
16 plugins, 16 running
- Список плагинов
-
[ 1] Admin Loader 3.5 neygomon admin_loader.am running
[ 2] DopBan 3.0.3b kanagava dop_ban.amxx running
[ 3] FreshBans 1.4.0b kanagava fresh_bans_140. running
[ 4] ScreenMaker 1.1 neygomon screen_maker.am running
[ 5] WebHS 0.1 kanagava fb_web_online.a running
[ 6] ReAimDetector API 0.2.1 ReHLDS Team reaimdetector.a running
[ 7] Ultimate Chats Control 4.5 neygomon ucc.amxx running
[ 8] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 9] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 10] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 11] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 12] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 13] CSStatsX SQL 0.7.4+1 serfreeman1337 csstatsx_sql.am running
[ 14] Test Vip 0.1 ill testvip_sql.amx running
[ 15] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 16] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 17] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 18] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 19] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 20] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 21] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 22] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 23] Map Manager: Advanced 0.0.4 Mistrick map_manager_adv running
[ 24] Menus Front-End 1.5 neugomon menufront_end.a running
[ 25] Admin Commands 1.9.0.5229 AMXX Dev Team admincmd.amxx running
[ 26] Players Menu 1.7 neugomon players_menu.am running
[ 27] Maps Menu 1.4.1+1 neugomon mapsmenu.amxx running
[ 28] Say me and Say hp 1.4 neygomon sayme.amxx running
[ 29] Stats Configuration 1.9.0.5229 AMXX Dev Team statscfg.amxx running
[ 30] CS Stats Logging 1.9.0.5229 AMXX Dev Team stats_logging.a running
[ 31] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 32] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 33] Ping Control 1.31 neygomon Ping_Control.am running
[ 34] Admin Models 1.2 pUzzlik admin_models_v1 running
[ 35] resetscore(ReAPI) 1.0 Phantom resetscore.amxx running
[ 36] Weapon Restrict 1.7 s1lent weapon_rest.amx running
[ 37] Advert Messages 1.22 neygomon adverts.amxx running
[ 38] Auto Demo Recorder 2.3 F@nt0M demo_recorder.a running
[ 39] Kills Counter 1.0 Safety1st killscounter.am running
[ 40] SF Warn Menu 0.1.4f serfreeman1337 sf_admin_warns. running
[ 41] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 42] Block Advert 1.4 neygomon block_advert.am running
[ 43] Lite Translit 2.8+1 neygomon lite_translit.a running
[ 44] Flash Control 2.2 neygomon flash_control.a running
[ 45] [ReAPI]Vip Weapons 3.6 ill Vip_Weapons.amx debug
[ 46] Night Damager_Parashut 1.0 ill NightLiteVip.am stopped
[ 47] Steam Bonus 1.1 ill+F@nToM steam_bonus_a2. stopped
[ 48] No Players Map 0.1 X-factor no_players_map. stopped
[ 49] Info Rank 0.1 by CepeH9 INFO_RANK_V0.1. running
[ 50] [ReAPI] Round Balancer 1.1 neygomon round_balancer. debug
[ 51] GameName Changer 1.0 neugomon gamename_change running
[ 52] ReAPI AWP Limitter 2.0 neygomon reapi_awp_limit running
[ 53] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 54] Yet Another Voteban 1.7 AndrewZ/voed/wop yet_another_vot running
[ 55] Private Message 0.5 Denzer PrivateMessage. running
[ 56] Time Pause Plugins 1.0 maFFyoZZyk & Mak time_pause_plug running
[ 57] block ip 0.2 legenda amx_blockip.amx running
[ 58] [ReAPI] Random Weapons 2.4.9 neugomon/h1k3 random_weapons_ running
58 plugins, 55 running
- Автор плагина
- neygomon
- Версия плагина
- 1.1
- Исходный код
-
#include amxmodx
#include reapi
#define ACCESS_IMMUNITY ADMIN_BAN // Иммунитет для админов при балансе (Админы игнорируются любым балансом(по числу/по скиллу))
// #define REPLACED_MENU // Кастомное меню с 2-мя пунктами.
#define SCORE_DIFF 2 // Разница в счете между командами (Вкл. аланс по скиллу, если одна команда перееигрывает другую на n раундов)
#define MIN_PLAYERS 10 // Минимальное кол-во игроков на сервере для баланса по силам ()
#define ROUND_BSKILL 3 // Каждые n раундов баланс по скиллу (Ну а че, нахер каждый раунд по скиллу то уравнивать?)
#define PL_IGNORE_NUM 3 // Каждые n перемещений в командах для одного игрока (баланс по кол-ву игроков) (Чтобы не кидало одного и того же)
#define PL_IGNORE_SKILL 3 // Каждые n замен по скиллу игрока может перемещать (Чтобы не кидало одного и того же)
/* Словарь плагина */
#define MSG_TRANSFER "^1[^4Balancer^1] ^3%s ^4будет перенеcён за команду ^3%s ^4в новом раунде."
#define MSG_TRANSFER_CT "контр-террористов"
#define MSG_TRANSFER_T "террористов"
#define MSG_REPLACE "^1[^4Balancer^1] ^4Сильный ^3%s ^4будет заменён на слабого ^3%s ^4в новом раунде."
/* Конец словаря */
#if !defined MAX_PLAYERS
#define MAX_PLAYERS 32
#endif
new g_iNumTt, g_iNumCt;
new g_iSkipNPl[MAX_PLAYERS+1], g_iSkipSPl[MAX_PLAYERS+1];
new g_iNewTeam[MAX_PLAYERS+1];
#define msgSayText 76
#define msgTeamInfo 86
#define msgShowOldMenu 96
#define msgShowVGUIMenu 114
public plugin_init()
{
register_plugin("[ReAPI] Round Balancer", "1.1", "neygomon");
RegisterHookChain(RG_CBasePlayer_Spawn, "fwdPlayerSpawnPre", false);
RegisterHookChain(RG_RoundEnd, "fwdRoundEnd", true);
#if defined REPLACED_MENU
register_clcmd("chooseteam", "ShowMenu");
register_menucmd(register_menuid("Team Menu"), MENU_KEY_1|MENU_KEY_6|MENU_KEY_0, "TeamMenuHandler");
register_message(msgShowOldMenu, "mShowMenu");
register_message(msgShowVGUIMenu, "mShowMenu");
#endif
set_task(1.0, "ChangeServerCvars");
}
public ChangeServerCvars()
{
set_cvar_num("mp_autoteambalance", 0);
#if defined REPLACED_MENU
set_cvar_num("mp_limitteams", 0);
#endif
}
public client_putinserver(id)
g_iNewTeam[id] = g_iSkipSPl[id] = g_iSkipNPl[id] = 0;
public fwdRoundEnd()
{
new players[32], pnum, szName[32], iTransferNum;
GetUsersInTeam(g_iNumTt, g_iNumCt);
iTransferNum = abs(g_iNumTt - g_iNumCt) / 2;
if(iTransferNum > 0)
{
get_players(players, pnum, "e", (g_iNumTt > g_iNumCt) ? "TERRORIST" : "CT");
for(new i; i < pnum; i++)
{
if(g_iSkipNPl[players[i]]-- || get_user_flags(players[i]) & ACCESS_IMMUNITY)
continue;
get_user_name(players[i], szName, charsmax(szName));
if(g_iNumTt > g_iNumCt)
ChatColor(MSG_TRANSFER, szName, MSG_TRANSFER_CT), g_iNewTeam[players[i]] = 2;
else ChatColor(MSG_TRANSFER, szName, MSG_TRANSFER_T), g_iNewTeam[players[i]] = 1;
g_iSkipNPl[players[i]] = PL_IGNORE_NUM;
if(--iTransferNum < 1) break;
}
}
new iCtWins, iTtWins;
iCtWins = get_member_game(m_iNumCTWins);
iTtWins = get_member_game(m_iNumTerroristWins);
if(get_member_game(m_iTotalRoundsPlayed) % ROUND_BSKILL || MIN_PLAYERS > get_playersnum() || SCORE_DIFF > abs(iTtWins - iCtWins))
return;
new iTeam, iLeader = (iTtWins > iCtWins) ? 1 : 2;
new iRatio[MAX_PLAYERS+1];
new pEnt1, pEnt2;
get_players(players, pnum);
for(new i; i < pnum; i++)
{
if(g_iSkipSPl[players[i]]-- || get_user_flags(players[i]) & ACCESS_IMMUNITY)
continue;
iTeam = get_member(players[i], m_iTeam);
switch(iTeam)
{
case 1, 2:
{
iRatio[players[i]] = get_user_frags(players[i]) - get_user_deaths(players[i]);
if(iTeam == iLeader)
{
if(iRatio[players[i]] > iRatio[pEnt1])
pEnt1 = players[i];
}
else if(iRatio[pEnt2] > iRatio[players[i]])
pEnt2 = players[i];
}
}
}
if(!pEnt1 || !pEnt2) return;
static szName1[32], szName2[32];
get_user_name(pEnt1, szName1, charsmax(szName1));
get_user_name(pEnt2, szName2, charsmax(szName2));
ChatColor(MSG_REPLACE, szName1, szName2);
switch(iLeader)
{
case 1: g_iNewTeam[pEnt1] = 2, g_iNewTeam[pEnt2] = 1;
case 2: g_iNewTeam[pEnt1] = 1, g_iNewTeam[pEnt2] = 2;
}
g_iSkipSPl[pEnt1] = g_iSkipSPl[pEnt2] = PL_IGNORE_SKILL;
}
public fwdPlayerSpawnPre(const id)
{
if(g_iNewTeam[id])
{
rg_set_user_team(id, g_iNewTeam[id]);
g_iNewTeam[id] = 0;
}
}
#if defined REPLACED_MENU
public mShowMenu(msgId, msgDest, msgEnt)
{
if(msgId == msgShowOldMenu)
{
static szArg4[20]; get_msg_arg_string(4, szArg4, charsmax(szArg4));
if(contain(szArg4, "Team_Select") == -1)
return PLUGIN_CONTINUE;
}
else if(get_msg_arg_int(1) != 2)
return PLUGIN_CONTINUE;
ShowMenu(msgEnt);
return PLUGIN_HANDLED;
}
public ShowMenu(id)
return show_menu(id, MENU_KEY_0|MENU_KEY_1|MENU_KEY_6, "\d[\rBalancer\d] \yВыберите действие:^n^n\y1. \rВойти в игру^n\y6. \wНаблюдение^n^n\y0. \wВыход", -1, "Team Menu");
public TeamMenuHandler(id, iKey)
{
switch(iKey)
{
case 0:
{
GetUsersInTeam(g_iNumTt, g_iNumCt);
set_member(id, m_bTeamChanged, false);
engclient_cmd(id, "jointeam", (g_iNumTt > g_iNumCt) ? "2" : "1");
}
case 5: user_silentkill(id), engclient_cmd(id, "jointeam", "6");
}
return PLUGIN_HANDLED;
}
#endif
stock ChatColor(const szMessage[], any:...)
{
static players[32], pnum; get_players(players, pnum, "c");
static szMsg[190]; vformat(szMsg, charsmax(szMsg), szMessage, 2);
for(new i; i < pnum; i++)
{
message_begin(MSG_ONE_UNRELIABLE, msgSayText, .player = players[i]);
write_byte(players[i]);
write_string(szMsg);
message_end();
}
}
stock GetUsersInTeam(&tt, &ct, players[32]="", pnum=0)
{
tt = ct = 0;
get_players(players, pnum);
for(new i; i < pnum; i++)
{
switch(get_member(players[i], m_iTeam))
{
case 1: tt++;
case 2: ct++;
}
}
}
Доброго времени суток, форумчане! Подскажите, что нужно исправить? Раньше небыло ошибок, щас не заметил с какого времени начали сыпаться ошибки((( Сам плагин не менял с 2017 года.
В этой теме было размещено решение! Перейти к решению.