- Ошибка
-
[spectator_bots.amxx] [SpecBot] Couldn't create a bot
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.10.0.5406 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jul 31 2020 14:34:47
Built from: https://github.com/alliedmodders/amxmodx/commit/1027df0
Build ID: 5406:1027df0
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.8.0.710-dev
Build date: 18:12:32 Jan 29 2021 (2484)
Build from: https://github.com/dreamstalker/rehlds/commit/1690200
- ReGamedll
-
ReGameDLL version: 5.20.0.492-dev
Build date: 15:26:35 Jan 4 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/aae507c
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.137 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5406 ini Start ANY
[ 6] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 7] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 8] FakeMeta RUN - fakemeta_amxx_i386.so v1.10.0.5406 pl5 ANY ANY
[ 9] CStrike RUN - cstrike_amxx_i386.so v1.10.0.5406 pl5 ANY ANY
[10] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.10.0.5406 pl5 ANY ANY
[11] CSX RUN - csx_amxx_i386.so v1.10.0.5406 pl5 ANY ANY
[12] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl5 ANY Never
[13] MySQL RUN - mysql_amxx_i386.so v1.10.0.5406 pl5 ANY ANY[14] Fun RUN - fun_amxx_i386.so v1.10.0.5406 pl5 ANY ANY
[15] Engine RUN - engine_amxx_i386.so v1.10.0.5406 pl5 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386.so v5.19.0.211-dev pl5 ANY Never
16 plugins, 16 running
- Список плагинов
-
Currently loaded plugins:
id name version author url file status
[ 1] 0 mdbBans 4.8 Desikac unknown mdbBansEN.a running
[ 2] 1 Admin Base 1.10.0.540 AMXX Dev Team admin.amxx running
[ 3] 2 CVAR Hostname Blocker 1.0 unknown block_hostn running
[ 4] 3 Admin Commands 1.10.0.540 AMXX Dev Team admincmd.am running
[ 5] 4 Admin Help 1.10.0.540 AMXX Dev Team adminhelp.a running
[ 6] 5 Multi-Lingual System 1.10.0.540 AMXX Dev Team multilingua running
[ 7] 6 Menus Front-End 1.10.0.540 AMXX Dev Team menufront.a running
[ 8] 7 Commands Menu 1.10.0.540 AMXX Dev Team cmdmenu.amx running
[ 9] 8 Players Menu 1.10.0.540 AMXX Dev Team plmenu.amxx running
[ 10] 9 Teleport Menu 1.10.0.540 AMXX Dev Team telemenu.am running[ 11] 10 Maps Menu 1.10.0.540 AMXX Dev Team mapsmenu.am running
[ 12] 11 Restrict Weapons 1.10.0.540 AMXX Dev Team restmenu.am running
[ 13] 12 Admin Chat 1.10.0.540 AMXX Dev Team adminchat.a running
[ 14] 13 Anti Flood 1.10.0.540 AMXX Dev Team antiflood.a running
[ 15] 14 Scrolling Message 1.10.0.540 AMXX Dev Team scrollmsg.a running
[ 16] 15 Info. Messages 1.10.0.540 AMXX Dev Team imessage.am running
[ 17] 16 Admin Votes 1.10.0.540 AMXX Dev Team adminvote.a running
[ 18] 17 Stats Configuration 1.10.0.540 AMXX Dev Team statscfg.am running
[ 19] 18 StatsX 1.10.0.541 AMXX Dev Team statsx.amxx running
[ 20] 19 CS Misc. Stats 1.10.0.540 AMXX Dev Team miscstats.a running
[ 21] 20 Chat Manager 4.5.1 OciXCrom unknown crx_chatman running[ 22] 21 ReAimDetector API 0.2.2 ReHLDS Team unknown reaimdetect running
[ 23] 22 OciXCrom's Rank System 3.9 OciXCrom unknown crx_ranksys running
[ 24] 23 Fast Knife 1.0.1 OciXCrom crx_fast_kn running
[ 25] 24 Restricted Names 1.1 Hattrick JM3Ch3R nick-replac running
[ 26] 25 CS Revo: Objetivo ou K 1.0 Wilian M. unknown csr_objetiv running
[ 27] 26 CS Revo: Fast Sniper 1.0 Wilian M. csrevo_fast running
[ 28] 27 CS Revo: Paraquedas Li 1.0 Wilian M. unknown csr_parachu running
[ 29] 28 CS Revo: Advanced Kill 0.9 Spection csr_kill_as running
[ 30] 29 CS AFK Manager 1.0.6 (amx Freeman afk_manager running
[ 31] 30 [ReApi] Killer ScreenF 0.0.4 Vaqtincha unknown reapi_kille running
[ 32] 31 VIP_Xtreme 3.5 $ohaibXtreme unknown VIP.amxx running[ 33] 32 Autoresponder/Advertis 0.5 MaximusBrood unknown ad_manager. running
[ 34] 33 AMXX Gag 1.5.0 xPaw & Exolent unknown amx_gag.amx running
[ 35] 34 [ReAPI] No Team Flash 0.0.3 Vaqtincha antiflash5. running
[ 36] 35 Ping Faker 1.0 Hattrick unknown pingfaker2. running
[ 37] 36 Ping Control 1.31 neygomon ping_contro running
[ 38] 37 [ReAPI] Block 'Fire in 0.0.1 sergrib unknown reapi_block running
[ 39] 38 Weapon Icon 1.2 hoboman313/Zenix unknown weapon_icon running
[ 40] 39 Simple Reset Score 1.0 PG unknown resetscore. running
[ 41] 40 Spectator Bots 2.1 SISA spectator_b running
[ 42] 41 ProxySnort 1.3 SPiNX proxysnort. running
[ 43] 42 Lite Auto Restart 1.0 CHEL74 lite_auto_r running
43 plugins, 43 running
- Автор плагина
- SISA
- Версия плагина
- 2.1
- Исходный код
-
#include <amxmodx>
#include <fakemeta>
#include <amxmisc>
#define BOTS_TASKID_DELAY1 683246
#define BOTS_TASKID_DELAY2 683247
#define BOTS_TASKID_DELAY3 683248
// Bots Data
enum _:e_BotsData
{
BOTS_ACTIVE_1,
BOTS_ACTIVE_2,
BOTS_ACTIVE_3,
BOTS_BLOBALID[33]
};
// Message IDs vars
new g_msgTeamInfo;
// Data
new g_iBotsData[e_BotsData], g_BotsName[3][32], g_Bot_Maxplayers[3];
// Cvars
new Float:g_fCvars_Time_Delay_Start, Float:g_fCvars_Time_Delay_Disconnect;
//Offsets
#define m_iTeam 114
#define CBASEMONSTER_LINUX_XTRA_OFF 5
new const SpecBots_ConfigFile[] = "addons/amxmodx/configs/spectator_bots.cfg"
/*===============================================================================
================================================================
[Plugin Init]
================================================================================
================================================================*/
public plugin_init()
{
register_plugin("Spectator Bots", "2.1", "SISA");
// Message IDs
g_msgTeamInfo = get_user_msgid("TeamInfo");
}
/*===============================================================================
================================================================
[Plugin Cfg]
================================================================================
================================================================*/
public plugin_precache()
{
if(!file_exists(SpecBots_ConfigFile))
{
write_file(SpecBots_ConfigFile, "Spec Bots - Settings^n")
write_file(SpecBots_ConfigFile, "specbots_name1 ^"Server IP: ^"")
write_file(SpecBots_ConfigFile, "specbots_name2 ^"fb.com/groups/emiratesgamingcm^"")
write_file(SpecBots_ConfigFile, "specbots_name3 ^"Buy Admin 25EUR^"")
write_file(SpecBots_ConfigFile, "specbots_time_delay_start ^"2.0^"")
write_file(SpecBots_ConfigFile, "specbots_time_delay_disconnect ^"3.0^"")
write_file(SpecBots_ConfigFile, "specbots_maxplayers1 ^"31^"")
write_file(SpecBots_ConfigFile, "specbots_maxplayers2 ^"30^"")
write_file(SpecBots_ConfigFile, "specbots_maxplayers3 ^"29^"")
write_file(SpecBots_ConfigFile, "specbots_host_autodetect ^"1^"")
}
}
public plugin_cfg()
{
// Задаем переменные
new cfgdir[64], szServerIP[32], iData[9];
// Получаем путь к папке с Конфигами
get_configsdir(cfgdir, charsmax(cfgdir));
iData[0] = register_cvar("specbots_name1", "Server IP: ");
iData[1] = register_cvar("specbots_name2", "fb.com/groups/emiratesgamingcm");
iData[2] = register_cvar("specbots_name3", "Buy Admin 25EUR");
iData[3] = register_cvar("specbots_time_delay_start", "2.0");
iData[4] = register_cvar("specbots_time_delay_disconnect", "3.0");
iData[5] = register_cvar("specbots_maxplayers1", "31");
iData[6] = register_cvar("specbots_maxplayers2", "30");
iData[7] = register_cvar("specbots_maxplayers3", "29");
iData[8] = register_cvar("specbots_host_autodetect", "1");
// Подгружаем Конфиг
server_cmd("exec %s/spectator_bots.cfg", cfgdir);
server_exec();
// Берем значения Кваров из конфига
get_pcvar_string(iData[0], g_BotsName[0], charsmax(g_BotsName[]));
get_pcvar_string(iData[1], g_BotsName[1], charsmax(g_BotsName[]));
get_pcvar_string(iData[2], g_BotsName[2], charsmax(g_BotsName[]));
g_fCvars_Time_Delay_Start = get_pcvar_float(iData[3]);
g_fCvars_Time_Delay_Disconnect = get_pcvar_float(iData[4]);
g_Bot_Maxplayers[0] = get_pcvar_num(iData[5]);
g_Bot_Maxplayers[1] = get_pcvar_num(iData[6]);
g_Bot_Maxplayers[2] = get_pcvar_num(iData[7]);
// Если разрешен Автодетект IP:PORT сервера
if(get_pcvar_num(iData[8]))
{
// Находим IP:PORT сервера
get_user_ip(0, szServerIP, charsmax(szServerIP), 0);
// Запоминаем IP:PORT сервера в глобальный массив
strcat(g_BotsName[0], szServerIP, charsmax(g_BotsName[]));
}
// Создаем двух Ботов
set_task(g_fCvars_Time_Delay_Start, "Task_Add_Fake_Bot", BOTS_TASKID_DELAY1, "1", 2);
set_task(g_fCvars_Time_Delay_Start, "Task_Add_Fake_Bot", BOTS_TASKID_DELAY2, "2", 2);
set_task(g_fCvars_Time_Delay_Start, "Task_Add_Fake_Bot", BOTS_TASKID_DELAY3, "3", 2);
}
/*===============================================================================
================================================================
[Client Disconnected]
================================================================================
================================================================*/
public client_disconnected(id)
{
// Задаем переменные
static iPlayersNum, Players[32];
// Получаем количество игроков, исключая Ботов
get_players(Players, iPlayersNum, "c");
// Если первый бот Не Создан и Количество игроков не превышает допустимый Максимум
if(!g_iBotsData[BOTS_ACTIVE_1] && iPlayersNum <= g_Bot_Maxplayers[0] && !g_iBotsData[BOTS_BLOBALID][id])
{
// Если таск не Выполняется
if(!task_exists(BOTS_TASKID_DELAY1))
set_task(g_fCvars_Time_Delay_Disconnect, "Task_Add_Fake_Bot", BOTS_TASKID_DELAY1, "1", 2); // Отправляем таск на создание Первого Бота
}
// Если второй бот Не Создан и Количество игроков не превышает допустимый Максимум
if(!g_iBotsData[BOTS_ACTIVE_2] && iPlayersNum <= g_Bot_Maxplayers[1] && !g_iBotsData[BOTS_BLOBALID][id])
{
// Если таск не Выполняется
if(!task_exists(BOTS_TASKID_DELAY2))
set_task(g_fCvars_Time_Delay_Disconnect, "Task_Add_Fake_Bot", BOTS_TASKID_DELAY2, "2", 2); // Отправляем таск на создание Второго Бота
}
if(!g_iBotsData[BOTS_ACTIVE_3] && iPlayersNum <= g_Bot_Maxplayers[2] && !g_iBotsData[BOTS_BLOBALID][id])
{
// Если таск не Выполняется
if(!task_exists(BOTS_TASKID_DELAY3))
set_task(g_fCvars_Time_Delay_Disconnect, "Task_Add_Fake_Bot", BOTS_TASKID_DELAY3, "3", 2); // Отправляем таск на создание Второго Бота
}
// Если вышел Первый Бот
if(g_iBotsData[BOTS_BLOBALID][id] == 1)
g_iBotsData[BOTS_ACTIVE_1] = 0; // Делаем Первого бота Не Активным
// Если вышел Второй Бот
if(g_iBotsData[BOTS_BLOBALID][id] == 2)
g_iBotsData[BOTS_ACTIVE_2] = 0; // Делаем Второго бота Не Активным
// Если вышел Второй Бот
if(g_iBotsData[BOTS_BLOBALID][id] == 3)
g_iBotsData[BOTS_ACTIVE_3] = 0; // Делаем Второго бота Не Активным
// Обнуляем номер Бота
g_iBotsData[BOTS_BLOBALID][id] = 0;
}
/*===============================================================================
================================================================
[Client Putinserver]
================================================================================
================================================================*/
public client_putinserver(id)
{
// Задаем переменные
static iPlayersNum, Players[32];
// Получаем количество игроков, исключая Ботов
get_players(Players, iPlayersNum, "c");
// Обнуляем номер Бота
g_iBotsData[BOTS_BLOBALID][id] = 0;
// Если первый бот Создан и Количество игроков превышает допустимый Максимум
if(g_iBotsData[BOTS_ACTIVE_1] && iPlayersNum >= g_Bot_Maxplayers[0])
{
// Делаем Первого бота Не Активным
g_iBotsData[BOTS_ACTIVE_1] = 0;
// Киаем бота
server_cmd("kick ^"%s^"", g_BotsName[0]);
}
// Если второй бот Создан и Количество игроков превышает допустимый Максимум
if(g_iBotsData[BOTS_ACTIVE_2] && iPlayersNum >= g_Bot_Maxplayers[1])
{
// Делаем Второго бота Не Активным
g_iBotsData[BOTS_ACTIVE_2] = 0;
// Киаем бота
server_cmd("kick ^"%s^"", g_BotsName[1]);
}
// Если второй бот Создан и Количество игроков превышает допустимый Максимум
if(g_iBotsData[BOTS_ACTIVE_3] && iPlayersNum >= g_Bot_Maxplayers[2])
{
// Делаем Второго бота Не Активным
g_iBotsData[BOTS_ACTIVE_3] = 0;
// Киаем бота
server_cmd("kick ^"%s^"", g_BotsName[2]);
}
}
/*===============================================================================
================================================================
[Task Add Fake Bot]
================================================================================
================================================================*/
public Task_Add_Fake_Bot(param[2])
{
// Задаем переменные
static msg[128], iPlayersNum, Players[32];
// Находим номер Бота
new iBotNum = str_to_num(param);
// Получаем количество игроков, исключая Ботов
get_players(Players, iPlayersNum, "c");
// Если на сервере слишком много игроков
if(iPlayersNum >= g_Bot_Maxplayers[iBotNum-1])
return;
// Создаем Бота
new Bot = engfunc(EngFunc_CreateFakeClient, g_BotsName[iBotNum-1]);
// Если бот не был Создан
if(!Bot)
{
// Отсправляем информацию в Амх Логи
log_amx("[SpecBot] Couldn't create a bot");
return;
}
// Вызываем ПриватДату
engfunc(EngFunc_FreeEntPrivateData, Bot);
// Задаем Сетинфо
set_user_info(Bot, "model", "gordon");
set_user_info(Bot, "*bot", "1");
// Вызываем фейковый Коннект
dllfunc(DLLFunc_ClientConnect, Bot, g_BotsName[iBotNum-1], "127.0.0.1", msg);
// Если бот Не Подключен
if(!is_user_connected(Bot))
return;
// Вызываем Путинсервер
dllfunc(DLLFunc_ClientPutInServer, Bot);
// Ставим Флаги
set_pev(Bot, pev_spawnflags, pev(Bot, pev_spawnflags) | FL_FAKECLIENT);
set_pev(Bot, pev_flags, pev(Bot, pev_flags) | FL_FAKECLIENT);
// Глобальная активность Ботов
if(iBotNum == 1)
g_iBotsData[BOTS_ACTIVE_1] = 1;
if(iBotNum == 2)
g_iBotsData[BOTS_ACTIVE_2] = 1;
if(iBotNum == 3)
g_iBotsData[BOTS_ACTIVE_3] = 1;
// Запоминаем ID бота
g_iBotsData[BOTS_BLOBALID][Bot] = iBotNum;
// Если Бот Не Валиден
if(pev_valid(Bot) != 2)
return;
// Меняем команду
set_pdata_int(Bot, m_iTeam, 3, CBASEMONSTER_LINUX_XTRA_OFF);
// Меняем данные
dllfunc(DLLFunc_ClientUserInfoChanged, Bot, engfunc(EngFunc_GetInfoKeyBuffer, Bot));
// Отправляем мессагу со сменой Команды
message_begin(MSG_BROADCAST, g_msgTeamInfo);
write_byte(Bot);
write_string("SPECTATOR");
message_end();
}
I have error on amxx log files [spectator_bots.amxx] [SpecBot] Couldn't create a bot
how can i fix this error?
I enjoy this forum and i found helpful. Thanks love this forum
how can i fix this error?
I enjoy this forum and i found helpful. Thanks love this forum