Участник
Пользователь
- Сообщения
- 20
- Реакции
- 9
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
- Ошибка
-
[ReAPI] get_member: invalid or uninitialized entity
[AMXX] Displaying debug trace (plugin "choose_teams.amxx", version "1.0")
[AMXX] Run time error 10: native error (native "get_member")
[AMXX] [0] choose_teams.sma::CMD_ChooseTeam (line 33)
- ОС
- Linux
- Amx Mod X
-
1.8.3-dev+5154
- Билд
-
3.4.0.654-dev
- ReGamedll
-
5.7.0.312-dev
- Версия Metamod
-
v1.3.0.127
- Список метамодулей
-
[ 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] WHBlocker RUN - whblocker_mm_i386.so v1.5.695 ini Chlvl ANY
[ 6] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 7] AMX Mod X RUN - amxmodx_mm_i386.so v1.8.3-dev+5154 ini Start ANY
[ 8] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 9] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.8.3-dev+5154 pl7 ANY ANY
[11] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.8.3-dev+5154 pl7 ANY ANY
[12] ReAPI RUN - reapi_amxx_i386.so v5.6.0.157-dev pl7 ANY Never
[13] MySQL RUN - mysql_amxx_i386.so v1.8.3-dev+5154 pl7 ANY ANY
[14] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl7 ANY Never
[15] CStrike RUN - cstrike_amxx_i386.so v1.8.3-dev+5154 pl7 ANY ANY
[16] Engine RUN - engine_amxx_i386.so v1.8.3-dev+5154 pl7 ANY ANY
- Список плагинов
-
[ 1] Aliases checker 1.0.3 kanagava alias_detector. running
[ 2] Admin Loader 3.5 neygomon admin_loader.am running
[ 3] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 4] FreshBans 1.4.0b kanagava fresh_bans.amxx running
[ 5] Ultimate Chats Control 4.5 neygomon ucc.amxx running
[ 6] Admin Commands 1.8.3-dev+ AMXX Dev Team admincmd.amxx running
[ 7] Menus Front-End 1.5 neugomon menufront_end.a running
[ 8] Commands Menu 1.8.3-dev+ AMXX Dev Team cmdmenu.amxx running
[ 9] SF Warn Menu 0.1.4g serfreeman1337 sf_admin_warns. running
[ 10] Players Menu 1.7 neugomon players_menu.am running
[ 11] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 12] Plugin Menu 1.8.3-dev+ AMXX Dev Team pluginmenu.amxx running
[ 13] Admin Chat 1.8.3-dev+ AMXX Dev Team adminchat.amxx running
[ 14] Info. Messages 1.8.3-dev+ AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.8.3-dev+ AMXX Dev Team adminvote.amxx running
[ 16] Lite MapChooser 2.6 neygomon mapchooser.amxx running
[ 17] Pause Plugins 1.8.3-dev+ AMXX Dev Team pausecfg.amxx running
[ 18] Stats Configuration 1.8.3-dev+ AMXX Dev Team statscfg.amxx running
[ 19] Restrict Weapons 1.8.3-dev+ AMXX Dev Team restmenu.amxx running
[ 20] CSStatsX SQL 0.7.4 serfreeman1337 csstatsx_sql.am running
[ 21] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx_cstr running
[ 22] Top Awards 1.0 neygomon top_awards.amxx running
[ 23] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 24] Say me and Say hp 1.4 neygomon sayme_reapi.amx running
[ 25] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 26] FM ResetScore 0.1 neygomon fm_rs.amxx running
[ 27] Ping Control 1.31 neygomon Ping_Control.am running
[ 28] Descriptive 'Fire in t 0.1 VEN descriptive_fir running
[ 29] Parachute Lite 1.0 Leo_[BH] parachute_lite. running
[ 30] Lite VIP System 1.5 neygomon lite_vip.amxx running
[ 31] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 32] Advert Messages 1.22 neygomon adverts.amxx running
[ 33] Game Sounds 1.1 maFFyoZZyk Game_Sounds.amx running
[ 34] ReAPI AWP Limitter 2.2 neygomon reapi_awp_limit debug
[ 35] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 36] Color Flash Screen 1.6.4 Radius (Stimul i color_flash_scr running
[ 37] BhopHack Detector 0.1 Mistrick bhophack_detect running
[ 38] GameName Changer 1.0 neugomon gamename_change running
[ 39] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 40] [ReAPI] Choose team 1.0 maFFyoZZyk choose_teams.am debug
[ 41] Lite Translit 2.8 neygomon lite_translit.a running
[ 42] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 43] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 44] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 45] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
- Автор плагина
- maFFyoZZyk
- Версия плагина
- 1.0
- Исходный код
-
#include <amxmodx>
#include <reapi>
//#define CUSTOM_MENU // Меню с 3-мя пунктами. 1 - Войти в игру, 6 - Наблюдатели, 0 - Выход
#define TIME_CHANGE 5 // Пауза между сменой команд, в секундах
#define PLAYER_DIFF 2 // Разница между командами (если на n человек больше, за эту команду зайти нельзя)
#define MAXPLAYERS 32
new g_MapName[32], bool:g_VIPMap = false;
new Float:g_fLastTeamChange[MAXPLAYERS+1];
public plugin_init()
{
register_plugin("[ReAPI] Choose team", "1.0", "maFFyoZZyk");
register_clcmd("chooseteam", "CMD_ChooseTeam");
RegisterHookChain(RG_ShowVGUIMenu, "fwdShowVGUIMenu", false);
RegisterHookChain(RG_HandleMenu_ChooseTeam, "fwdHandleMenu_ChooseTeam", false);
get_mapname(g_MapName, charsmax(g_MapName));
if(containi(g_MapName, "as_") != -1) g_VIPMap = true;
set_task(1.2, "ChangeServerCvars");
}
public ChangeServerCvars()
set_cvar_num("mp_limitteams", 0);
public CMD_ChooseTeam(id)
{
if(is_user_connected(id))
set_member(id, m_bTeamChanged, false);
if(TIME_CHANGE && get_member(id, m_iTeam))
{
new Float:fNextChoose = g_fLastTeamChange[id] + TIME_CHANGE;
new Float:fCurTime = get_gametime();
if(fNextChoose > fCurTime)
{
client_print_color(id, 0, "^1[^4Energy^1] ^1Сменить команду можно через ^4%d ^1секунд", floatround(fNextChoose - fCurTime));
return HC_SUPERCEDE;
}
}
return HC_CONTINUE;
}
public fwdShowVGUIMenu(const id, VGUIMenu:menuType, const bitsSlots, szOldMenu[])
{
if(menuType == VGUI_Menu_Team)
{
set_member(id, m_bForceShowMenu, true);
#if defined CUSTOM_MENU
SetHookChainArg(3, ATYPE_INTEGER, MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_6);
SetHookChainArg(4, ATYPE_STRING, "\yВыберите действие:^n^n\y1. \rВойти в игру^n\y6. \wНаблюдение^n^n\y0. \wВыход");
#else
new iTeamTT, iTeamCT; CalculateTeamNum(iTeamTT, iTeamCT);
new TeamName:team = get_member(id, m_iTeam);
new szMenu[192], iKeys = MENU_KEY_0;
new iLen = formatex(szMenu, charsmax(szMenu), "\yВыбор команды:^n^n");
if((iTeamTT - iTeamCT) >= PLAYER_DIFF || team == TEAM_TERRORIST)
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y1. \dТеррористы [\r%d\w]^n", iTeamTT);
else
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y1. \wТеррористы [\r%d\w]^n", iTeamTT);
iKeys |= MENU_KEY_1;
}
if((iTeamCT - iTeamTT) >= PLAYER_DIFF || team == TEAM_CT)
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y2. \dСпецотряд [\r%d\w]^n^n", iTeamCT);
else
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y2. \wСпецотряд [\r%d\w]^n^n", iTeamCT);
iKeys |= MENU_KEY_2;
}
if(g_VIPMap)
{
if(team != TEAM_CT) iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y3. \dVIP^n^n");
else
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y3. \wVIP^n^n");
iKeys |= MENU_KEY_3;
}
}
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y5. \yАвто-Выбор^n");
iKeys |= MENU_KEY_5;
if(team == TEAM_SPECTATOR)
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y6. \rНаблюдение^n^n^n");
else
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y6. \rНаблюдение^n^n^n");
iKeys |= MENU_KEY_6;
}
formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\y0. \wВыход");
SetHookChainArg(3, ATYPE_INTEGER, iKeys);
SetHookChainArg(4, ATYPE_STRING, szMenu);
#endif
}
else if(menuType == VGUI_Menu_Class_T)
{
SetHookChainArg(3, ATYPE_INTEGER, MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_2 | MENU_KEY_3 | MENU_KEY_4 | MENU_KEY_5);
SetHookChainArg(4, ATYPE_STRING, "\yВыберите действие:^n^n\r1. \wPhoenix Connexion^n\r2. \wElite Crew^n\r3. \wArctic Avengers^n\r4. \wGuerilla Warface^n^n\r5. \yАвто-Выбор^n^n^n\r0. \wВыход");
}
else if(menuType == VGUI_Menu_Class_CT)
{
SetHookChainArg(3, ATYPE_INTEGER, MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_2 | MENU_KEY_3 | MENU_KEY_4 | MENU_KEY_5);
SetHookChainArg(4, ATYPE_STRING,"\yВыберите действие:^n^n\r1. \wSeal Team 6^n\r2. \wGSG-9^n\r3. \wSAS^n\r4. \wGIGN^n^n\r5. \yАвто-Выбор^n^n^n\r0. \wВыход");
}
return HC_CONTINUE;
}
public fwdHandleMenu_ChooseTeam(const id, const MenuChooseTeam:key)
{
switch(key)
{
#if defined CUSTOM_MENU
case 1: SetHookChainArg(2, ATYPE_INTEGER, (rg_get_join_team_priority() == TEAM_TERRORIST) ? MenuChoose_T : MenuChoose_CT);
case MenuChoose_Spec: user_silentkill(id);
#else
case MenuChoose_T: SetHookChainArg(2, ATYPE_INTEGER, MenuChoose_T);
case MenuChoose_CT: SetHookChainArg(2, ATYPE_INTEGER, MenuChoose_CT);
case MenuChoose_AutoSelect: SetHookChainArg(2, ATYPE_INTEGER, MenuChoose_AutoSelect);
case MenuChoose_Spec: user_silentkill(id);
#endif
}
g_fLastTeamChange[id] = get_gametime();
return HC_CONTINUE;
}
CalculateTeamNum(&iTeamTT, &iTeamCT)
{
for(new id = 1; id <= MAXPLAYERS; id++)
{
if(!is_user_connected(id)) continue;
switch(get_member(id, m_iTeam))
{
case TEAM_CT: iTeamCT++;
case TEAM_TERRORIST: iTeamTT++;
}
}
}
Время от времени появляется лог с ошибкой данного плагина, к сожалению в коде не силен и единственное что понимаю дак это что дело в 33 строке («get_member») какие правки нужно внести?
Вложения
-
5.3 KB Просмотры: 416