проблема с плагином

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
552
Реакции
49
Предупреждения
2
Помог
4 раз(а)
Ошибка
зависает все когда двигаюсь
ОС
Linux
Amx Mod X
1.9.0 build 5249
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.8.0.709-dev+m
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 v1.21p37  2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.0.9 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 4] VoiceTranscoder RUN - VoiceTranscoder. v2017RC4 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 6] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i38 v1.5.696 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 9] Ultimate Unprec RUN - unprecacher_i386 vBeta 2. ini Chlvl Chlvl
[10] YaPB RUN - yapb.so v4.2.598 ini Chlvl ANY
[11] POD-Bot mm RUN - podbot_mm_i386.s vV3B21 ini Chlvl ANY
[12] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl5 ANY ANY
[13] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl5 ANY ANY
[14] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl5 ANY ANY
[15] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl5 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl5 ANY ANY
[17] GeoIP RUN - geoip_amxx_i386. v1.9.0.5 pl5 ANY ANY
[18] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl5 ANY ANY
[19] SQLite RUN - sqlite_amxx_i386 v1.9.0.5 pl5 ANY ANY
[20] Engine RUN - engine_amxx_i386 v1.9.0.5 pl5 ANY ANY
[21] ReAPI RUN - reapi_amxx_i386. v5.1.0.1 pl5 ANY Never
[22] ReAimDetector RUN - reaimdetector_am v0.2.2 pl5 ANY Never
[23] Orpheu RUN - orpheu_amxx_i386 v2.6.3 pl5 ANY ANY
23 plugins, 23 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Map Manager 2.5.60 Mistrick mapmanager.amxx running
[ 2] mute 1.0 Aziz xman2030_mute.a running
[ 3] Admin Base 1.9.0.5249 AMXX Dev Team admin.amxx running
[ 4] Admin Commands 1.9.0.5249 AMXX Dev Team admincmd.amxx running
[ 5] Admin Help 1.9.0.5249 AMXX Dev Team adminhelp.amxx running
[ 6] Slots Reservation 1.9.0.5249 AMXX Dev Team adminslots.amxx running
[ 7] Multi-Lingual System 1.9.0.5249 AMXX Dev Team multilingual.am running
[ 8] Commands Menu 1.9.0.5249 AMXX Dev Team cmdmenu.amxx running
[ 9] Players Menu 1.9.0.5249 AMXX Dev Team plmenu.amxx running
[ 10] Teleport Menu 1.9.0.5249 AMXX Dev Team telemenu.amxx running
[ 11] Maps Menu 1.9.0.5249 AMXX Dev Team mapsmenu.amxx running
[ 12] Plugin Menu 1.9.0.5249 AMXX Dev Team pluginmenu.amxx running
[ 13] Admin Chat 1.9.0.5249 AMXX Dev Team adminchat.amxx running
[ 14] Anti Flood 1.9.0.5249 AMXX Dev Team antiflood.amxx running
[ 15] Admin Votes 1.9.0.5249 AMXX Dev Team adminvote.amxx running
[ 16] Pause Plugins 1.9.0.5249 AMXX Dev Team pausecfg.amxx running
[ 17] Stats Configuration 1.9.0.5249 AMXX Dev Team statscfg.amxx running
[ 18] Ultimate Gore 1.6 JTP10181 amx_gore_ultima running
[ 19] TimeLeft 1.9.0.5249 AMXX Dev Team timeleft.amxx running
[ 20] Advanced Weapon Tracer 1.3.0 ConnorMcLeod advanced_weapon running
[ 21] NextMap 1.9.0.5249 AMXX Dev Team nextmap.amxx stopped
[ 22] POD-Bot Menu 1.3 g4s|figurE.09 amxx_podbotmenu running
[ 23] Game Namer 1.1 NeuroToxin gamenamechanger running
[ 24] Precache Management 1.0.0 ConnorMcLeod precache_manage stopped
[ 25] Advert Messages 1.2 neygomon adverts.amxx running
[ 26] Fix Remove Entity When zm zm zp_entityfix.am paused
[ 27] ScreenMaker 1.1 neygomon screen_maker.am running
[ 28] fb_forwards 0.1.8 Mazdan & Neugomo fb_forwards.amx running
[ 29] FreshBans 1.4.0b kanagava fresh_bans_1.4. running
[ 30] Menus Front-End 1.5 neugomon menufront_end.a running
[ 31] AMXX Gag 1.4.9 xPaw & Exolent amx_gag.amxx running
[ 32] motd 1.1 L@NPOC@N motd.amxx running
[ 33] unknown unknown unknown warnings.amxx bad load
[ 34] Anti Reklama 1.1 MarcaD anti_reklama.am running
[ 35] unknown unknown unknown health_nade.amx bad load
[ 36] SpecList 1.2a FatalisDK speclist_rus.am running
[ 37] DemoRecoder 1.2 neygomon demorecoder.amx running
[ 38] Zombie Escape xman2030 xman2030_ze_mod debug
[ 39] [ZP]Level System 6.0 Dambas xman2030_level. running
[ 40] Camera View 0.0.1 ConnorMcLeod talrasha_camera debug
[ 41] [ZE] ZClass: Hunter 1.0 KOBRA / t3rkecor xman2030_speed. running
[ 42] [ZP] Class : Frank 1.0 tumoxa xman2030_pc.amx running
[ 43] DJB Zombie Class Banch 1.0 Csoldjb xman2030_witch. running
[ 44] [CSO Like] ZClass: Yak 0.2 | 30.0 inf xman2030_sasha. running
[ 45] [ZP Class] Flying Zomb 0.1 ONYX xman2030_flying running
[ 46] ZP Class Energy Ball(T 2.1 Jim/tERoR edit/O xman2030_tesla. running
[ 47] [CSO] Class String Fin 2.0 BLACK_ROSE zp_class_finger running
[ 48] Undertaker 1.0 DSHGFHDS zp_undertaker.a debug
[ 49] NST Zombie Class Heal 1.0 NST NST_ZbClass_Hea running
[ 50] [ZP] Drowned Zombie 1.2 tuty/CHyC zp_drowned_zomb running
[ 51] Houndeye Zombie 0.4 Morte zp_zclass_hound running
[ 52] unknown unknown unknown azp_zclass_sire running
[ 53] [CSO:Heavy Zombie] 1.1 REDEMAX cso_heavy.amxx running
[ 54] CSO Lusty Rose 1.0.1 ALBTeam zp_class_LustyR running
[ 55] [ZP] Class: x-Voodoo 2019 | 1.0 xUnicorn (t3rkec zp_zclass_voodo running
[ 56] [CSO:Hunter Zombie] 1.2 HoRRoR/tERoR edi zp_china.amxx running
[ 57] xman2030_zombieclass_b CS-FADE.RU CS-FADE.RU xman2030_zombie running
[ 58] ZM VIP 1.7.2 aaarnas xman2030_vip.am running
[ 59] [FS] Chat 1.1 Inf xman2030_chat.a running
[ 60] Random Sounds 3.0 xman2030 (Putin) xman2030_random paused
[ 61] Heli Button Info 1.0 Shanks' xman2030_showes running
[ 62] [ZP] EASY SAVE AMMO 1.2 CS-FADE.RU xman2030_ammo_a running
[ 63] [ZP] Addon: Win Models 0.1 CS-FADE.RU xman2030_ze_amo debug
[ 64] [ZP Addon] Knives 0.1 ONYX xman2030_knifes running
[ 65] [ZP] Admin Lvl Menu 1.0 Dambas xman2030_level_ running
[ 66] ZE HUD Final CS-FADE.RU xman2030_ze_hud running
[ 67] NadeModes 11.2 Nomexous & OT xman2030_nademo running
[ 68] [ZP] ZP++ Ice Cube 1.0 DareDevil (Gyiov xman2030_ice_cu running
[ 69] Weapon Model + Sound R 1.2 GHW_Chronic GHW_Weapon_Repl running
[ 70] xman2030_damager CS-FADE.RU CS-FADE.RU xman2030_damage running
[ 71] ZP: Zombie Health 1.0 Yakess yakess_health.a debug
[ 72] AMMO ON THE GROUND 1.3 Sanya@ (Skype: a ammo_on_the_gro running
[ 73] Countdown 1.7.3 T a l R a s h a gameplay_countd running
[ 74] Zp info Big 0.1 TalRasha zp_info_big.amx running
[ 75] [ZP Addon] Atmosphere 1.1 CS-FADE.RU xman2030_atmosp paused
[ 76] Automatic Unstuck 1.5 NL)Ramon(NL Auto_Unstuck.am running
[ 77] [ZP] Addon: Ammo Box 1.1 | 2019 xUnicorn zp_addon_ammobo running
[ 78] Addon Gundrop effect 0.1 PaXaN-ZOMBIE efGundrop.amxx running
[ 79] ammo donate/dhud 1.5 user/zobie-dead zp_ammo_donate. running
[ 80] Team Locker 1.5 Bmann_420 teamlocker.amxx running
[ 81] xman2030_human_revolut CS-FADE.RU CS-FADE.RU xman2030_human_ running
[ 82] xman2030_evolution_bon CS-FADE.RU CS-FADE.RU xman2030_evolut running
[ 83] xman2030_cons CS-FADE.RU CS-FADE.RU xman2030_cons.a running
[ 84] [ZP] Addon: Evolution 0.0.7 https://vk.com/i xman2030_evolut running
[ 85] xman2030_aura CS-FADE.RU CS-FADE.RU xman2030_aura.a running
[ 86] xman2030_blood CS-FADE.RU CS-FADE.RU xman2030_blood. running
[ 87] Menu_Priv 1.0 CS-FADE.RU xman2030_menu_p running
[ 88] [ZP] VIP menu 1.2 CS-FADE.RU xman2030_vip_me running
[ 89] [ZP] VIP menu 1.2 CS-FADE.RU xman2030_deluxe running
[ 90] [ZP] VIP menu 1.2 CS-FADE.RU xman2030_creato debug
[ 91] ammo paki 4.0 Bagamut xman2030_ammo_m running
[ 92] unknown unknown unknown xman2030_lk.amx running
[ 93] [ZP] Extra Item: Jump 1.0 Opo4uMapy xman2030_jumpbo running
[ 94] [ZP] Extra Item Speed 1.2 MeRcyLeZZ zp_extra_speed_ running
[ 95] unknown unknown unknown xman2030_buy_hp running
[ 96] Janus 1 1.0 m4m3ts xman2030_janus1 running
[ 97] [CSO LIKE] Extra: Gull 1.0 Lakerovich xman2030_bloodr running
[ 98] [Zombie Plague] Weapon 0.7 PlaneShfit1231 / zp_extra_rpg7.a running
[ 99] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 xman2030_m3.amx running
[100] [ZP] Weapon: M32 1.0 PbI)I(Uu' / Batc xman2030_m32.am running
[101] [ZP] Extra: CSO ClayMo 1.0 TemplateAuthor:K xman2030_Claymo running
[102] [ZP] Air Strike 1.0 Dorus xman2030_air_st running
[103] [CSO LIKE] LaserMG 1.1 Lakerovich cso_weapon_lase running
[104] Janus-11 1.0 m4m3ts zp_extra_janus1 running
[105] [ZP] Extra: HK416 1.0 Crock / =) (Popr yt_extra_janus1 running
[106] Rail Cannon 1.0 m4m3ts zp_extra_railca running
[107] [ZP] Weapon: Shining H 1.0 xUnicorn (t3rkec zp_weapon_magic running
[108] ZP Extraitem: FNP-45 1.0 Base: Batcon; Re zp_extraitems_f running
[109] [ZP] Weapon: JANUS-7 1.0 xUnicorn (t3rkec zp_weapon_janus running
[110] Extraitems: Water Pist 1.0 Base: Batcon & x zp_extraitems_w running
[111] [ZP] Weapon: Crossbow 1.0 xUnicorn (t3rkec zp_weapon_cross running
[112] [ZMO] Extra-Item: Skul 1.0 Mr.Kot3 zmo_weapon_skul running
[113] [ZP] Weapon: DInfinity 1.0 -- zp_weapon_duali running
[114] [ZP] Extra: m134ex 1.0 LARS-DAY[BR]EAKE zp_weapon_m134e running
[115] [ZP] Weapon: Ripper (P 1.0 xUnicorn (t3rkec zp_weapon_chain running
[116] Extraitems: Oz Lion Pi 1.0 Base: Batcon & x zp_extraitems_o running
[117] [ZP] Extra item: Aeoli 1.0 m4m3ts zp_extra_aeolis running
[118] [ZE] Addon: XMAS 2040 0.1 | 30.0 Reega! inf2030_ze_lead running
[119] [ZM] Choose Weapon 1.6.1 t3rkecorejz | Un xman2030_menu_w running
[120] HUINYA HUINYA HUINYA xman2030_def_we running
[121] [ZP] Extra: Anaconda 1.0 Crock / =) (Popr xman2030_anacon running
[122] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 xman2030_Vulcan running
[123] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 xman2030_Sapien running
[124] [ZP] Extra: M1887 1.0 Crock / =) (Popr xman2030_m1887. running
[125] [ZMO]Weapon: Cyclone 1.0 Base: Batcon; Re xman2030_cyclon running
[126] [ZP] Weapon: Shining H 1.0 xUnicorn (t3rkec xman2030_magicm running
[127] [CSO] Ethereal 0.0.1 Shurik07 xman2030_ethere running
( 33) Load fails: Invalid Plugin (plugin "warnings.amxx")
( 35) Load fails: Module/Library "curl" required for plugin. Check modules.ini.
127 plugins, 120 running
Автор плагина
Crazy
Версия плагина
v0.2
Исходный код
#include <amxmodx>
#include <zombieplague>


/*================================================================================
[Plugin Customization]
=================================================================================*/

// Items name (note: add exact item name)

new const EXTRA_ITEMS[][] = {
"Frost Grenade",
"Fire Grenade",
"Flare Grenade",
"Janus-1",
"Gulliotine",
"RPG-7",
"Laserminigun",
"Janus-11",
"Janus13",
"Janus5",
"Rail Cannon",
"Aeolis",
"Shining Heart Rod",
"FNP-45",
"JANUS-7",
"Water Pistol",
"CrossBow",
"Skull-1 Blood",
"M134ex",
"Ripper (PowerSaw)",
"Oz Lion Pistol",
}

/*================================================================================
Customization ends here! Yes, that's it. Editing anything beyond
here is not officially supported. Proceed at your own risk...
=================================================================================*/

enum
{
TASK_STARTGIVE = 298,
TASK_GIVEITEM
}

#define ID_BOT (taskid - TASK_GIVEITEM)

new cvar_max_bots, g_botname[33][32], g_has_item[33], g_maxplayers;

public plugin_init()
{
/* Plugin register */
register_plugin("[ZP] Bot Addon: Force buy items", "v0.2", "Crazy");

/* Cvars */
cvar_max_bots = register_cvar("zp_force_buy_maxbots", "12");

/* Max players */
g_maxplayers = get_maxplayers()
}

public client_putinserver(id)
{
if (is_user_bot(id))
get_user_name(id, g_botname[id], charsmax(g_botname[]));
}

public zp_round_started(gamemode, id)
{
for (new id = 1; id <= g_maxplayers; id++)
g_has_item[id] = false;

if (gamemode != MODE_PLAGUE || MODE_SURVIVOR)
set_task(2.0, "give_item_task", TASK_STARTGIVE);
}

public give_item_task(taskid)
{
static id, iBots, iMaxBots;
iBots = 0;
iMaxBots = get_pcvar_num(cvar_max_bots);

while (iBots <= iMaxBots)
{
id = get_random_bot(random_num(1, get_alive_bots()));

if (!is_user_alive(id))
continue;

if (zp_get_user_zombie(id))
continue;

if (g_has_item[id])
continue;

set_task(1.0, "give_item", id+TASK_GIVEITEM);

iBots++;
}

remove_task(TASK_STARTGIVE);
remove_task(TASK_GIVEITEM);
}

public give_item(taskid)
{
static id, random, itemid;
id = ID_BOT;
random = random_num(0, sizeof EXTRA_ITEMS - 1);
itemid = zp_get_extra_item_id(EXTRA_ITEMS[random]);

if (itemid == -1)
{
set_task(0.5, "give_item", id+TASK_GIVEITEM);
return;
}

zp_force_buy_extra_item(id, itemid, 1);
g_has_item[id] = true;
remove_task(id+TASK_GIVEITEM);
}

get_alive_bots()
{
static iBot, id;
iBot = 0;

for (id = 1; id <= g_maxplayers; id++)
{
if (is_user_alive(id) && is_user_bot(id))
iBot++;
}

return iBot;
}

get_random_bot(n)
{
static iBot, id;
iBot = 0;

for (id = 1; id <= g_maxplayers; id++)
{
if (is_user_alive(id) && is_user_bot(id))
iBot++;

if (iBot == n)
return id;
}

return -1;
}
Здравствуйте. Возникла такая проблема с этим плагином. Он даёт рандомные экстра предметы ботам из списка который в самом начале кода. И когда я двигаюсь (наверное) то все просто зависает а сервер работает! Что я не так делаю?
 
Сообщения
75
Реакции
36
Помог
4 раз(а)
Попробуй логом глянуть какой там айди передается.

C++:
itemid = zp_get_extra_item_id(EXTRA_ITEMS[random]);
server_print("itemid: %i", itemid);
Вообще реализацию можно было и другую. Например в plugin_init один раз чекнуть все пушки и записать в массив только те у которых не -1, если пушек 0 ставим плагин на паузу ну или set_fail_state. В ином случае потом радномом получаешь присутствующую экстру.
 
Сообщения
552
Реакции
49
Предупреждения
2
Помог
4 раз(а)
@Алексеич,закрывай тему, я забросил сервер
 
Статус
В этой теме нельзя размещать новые ответы.

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

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