ERROR RECSDM

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
162
Реакции
4
Помог
3 раз(а)
Ошибка
[csdm_main.amxx] Function not found! (AddMenuItem_call failed)
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5249 (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: Jun 19 2019 13:31:53
Built from: https://github.com/alliedmodders/amxmodx/commit/6cecb34
Build ID: 5249:6cecb34
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.7.0.692-dev
Build date: 18:58:01 Sep 21 2019 (1988)
Build from: https://github.com/dreamstalker/rehlds/commit/e7232be
ReGamedll
ReGameDLL version: 5.12.0.425-dev
Build date: 08:48:23 Nov 2 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/fd06d65
Версия 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
Список метамодулей
[ 1] VoiceTranscoder  RUN   -    VoiceTranscoder.so        v2017RC4         ini  ANY   ANY  
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5249 ini Start ANY
[ 3] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 4] MySQL RUN - mysql_amxx_i386.so v1.9.0.5249 pl2 ANY ANY
[ 5] Fun RUN - fun_amxx_i386.so v1.9.0.5249 pl2 ANY ANY
[ 6] Engine RUN - engine_amxx_i386.so v1.9.0.5249 pl2 ANY ANY
[ 7] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5249 pl2 ANY ANY
[ 8] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5249 pl2 ANY ANY
[ 9] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5249 pl2 ANY ANY
[10] CSX RUN - csx_amxx_i386.so v1.9.0.5249 pl2 ANY ANY
[11] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5249 pl2 ANY ANY
[12] ReAPI RUN - reapi_amxx_i386.so v5.11.0.189-dev pl2 ANY Never
[13] ReCSDM RUN - csdm_amxx_i386.so v3.6 pl2 ANY ANY
13 plugins, 13 runnin
Список плагинов
[  1] GameName Changer        1.0         neugomon          gamename_change  running  
[ 2] FreshBans 1.4.2b kanagava fresh_bans.amxx running
[ 3] Admin Commands 1.9.0.5249 AMXX Dev Team admincmd.amxx running
[ 4] Slots Reservation 1.2 pUzzlik admin_slots.amx running
[ 5] Multi-Lingual System 1.9.0.5249 AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.5 neugomon menufront_end.a running
[ 7] Commands Menu 1.9.0.5249 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.7 neugomon players_menu.am running
[ 9] Maps Menu 1.9.0.5249 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0.5249 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0.5249 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0.5249 AMXX Dev Team antiflood.amxx running
[ 13] Pause Plugins 1.9.0.5249 AMXX Dev Team pausecfg.amxx running
[ 14] Advert Messages 1.22 neygomon adverts.amxx running
[ 15] AFK Control 1.4.1 [NoR neygomon afk_control.amx running
[ 16] GameCMS_API 5.3.5 zhorzh78 gamecms_api_5.3 running
[ 17] GameCMS BonusSystem 1.1 +- DUKKHAZ0R gamecms_bonus.a running
[ 18] GameCMS Time Awards 1.4 API_5 zhorzh78 gamecms_time_aw running
[ 19] GameCMS_Informer 2.3 API5 zhorzh78 forum_HUD_infor running
[ 20] No Players Map 1.03 neygomon no_players_map. stopped
[ 21] Hide Slash 1.0 123 SymbolChat.amxx running
[ 22] Map Manager: Core 3.0.4 Mistrick map_manager_cor running
[ 23] Map Manager: Scheduler 0.1.2 Mistrick map_manager_sch running
[ 24] Map Manager: Rtv 0.1.0 Mistrick map_manager_rtv running
[ 25] Map Manager: Nominatio 0.1.0 Mistrick map_manager_nom running
[ 26] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 27] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 28] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 29] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 30] ReCSDM Main 3.6 ReCSDM Team csdm_main.amxx running
[ 31] ReCSDM Equip 3.6 ReCSDM Team csdm_equip.amxx running
[ 32] ReCSDM Spawns 3.6 ReCSDM Team csdm_spawn_pres running
[ 33] ReCSDM Misc 3.6 ReCSDM Team csdm_misc.amxx running
[ 34] ReCSDM Stripper 3.6 KWo csdm_stripper.a running
[ 35] ReCSDM Protection 3.6 BAILOPAN csdm_protection running
[ 36] ReCSDM FFA 3.6 ReCSDM Team csdm_ffa.amxx running
[ 37] ReCSDM Item Mode 3.6 FALUCO & KWo & S csdm_itemmode.a running
Автор плагина
Adidasman, s1lent
Версия плагина
3.6
Исходный код
/**
* csdm_main.sma
* Allows for Counter-Strike to be played as DeathMatch.
*
* CSDM Main - Main plugin to communicate with module
*
* (C)2003-2013 David "BAILOPAN" Anderson
*
* Give credit where due.
* Share the source - it sets you free
* http://www.opensource.org/
* http://www.gnu.org/
*
*
*
* Modification from ReCSDM Team (C) 2016
* http://www.dedicated-server.ru/
*
*/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <csdm>

#pragma semicolon 1

#if AMXX_VERSION_NUM < 183
#define send_client_cmd client_cmd
#else
#define send_client_cmd amxclient_cmd
#endif

#define CSDM_OPTIONS_TOTAL 2

new D_PLUGIN[] = "ReCSDM Main";
new D_ACCESS = ADMIN_MAP;
new const g_wbox_model[] = "models/w_weaponbox.mdl";
new const g_shield_model[] = "models/w_shield.mdl";
new bool:g_StripWeapons = true;
new bool:g_RemoveBomb = true;
new g_StayTime;
new g_drop_fwd;
new g_options[CSDM_OPTIONS_TOTAL];
new g_MainMenu = -1;
new g_SettingsMenu = -1;
new g_MainSettMenu = -1;
new g_max_clients;
new g_filename[128];

public plugin_natives()
{
register_native("csdm_main_menu", "native_main_menu");
register_native("csdm_settings_menu", "native_settings_menu");
register_native("csdm_set_mainoption", "__csdm_allow_option");
register_native("csdm_fwd_drop", "__csdm_fwd_drop");
register_native("csdm_write_cfg", "native_write_cfg");
register_library("csdm_main");
}

public native_main_menu(id, num)
{
return g_MainMenu;
}

public native_settings_menu(id, num)
{
return g_SettingsMenu;
}

public __csdm_allow_option(id, num)
{
new option = get_param(1);

if (option <= 0 || option >= CSDM_OPTIONS_TOTAL) {
log_error(AMX_ERR_NATIVE, "Invalid option number: %d", option);
return 0;
}

g_options[option] = get_param(2);

return 1;
}

public __csdm_fwd_drop(id, num) { }

public native_write_cfg(id,num)
{
new cfgdir[128], section[32], parameter[32], value[16], sect[32];
new id, sect_length, param_length;

get_configsdir(cfgdir, charsmax(cfgdir));
formatex(g_filename, charsmax(g_filename), "%s/csdm.cfg", cfgdir);

id = get_param(1);
get_string(2, section, charsmax(section));
get_string(3, parameter, charsmax(parameter));
get_string(4, value, charsmax(value));
sect_length = strlen(section) + 1;
param_length = strlen(parameter) - 1;
formatex(sect, charsmax(sect), "[%s]", section);

if (file_exists(g_filename))
{
new Data[124], len, line;
new bool:bFoundSec = false;
new bool:bFoundPar = false;
new bool:bErrorFindSect = true;
new bool:bErrorFindParam = false;

while((line = read_file(g_filename, line, Data, charsmax(Data), len)) != 0)
{
if (Data[0] == ';' || strlen(Data) < 2) {
continue;
}

if (Data[0] == '[')
{
if (bFoundSec) {
bErrorFindParam = true;
break;

} else if (equali(Data, sect, sect_length)) {
bFoundSec = true;
bErrorFindSect = false;
}

}
else if (bFoundSec && equali(Data, parameter, param_length)) {
bFoundPar = true;
break;
}
}

if (bFoundPar && line > 0)
{
new text[32];
formatex(text, charsmax(text), "%s = %s", parameter, value);

if (write_file(g_filename, text, line - 1)) {
client_print(id, print_chat, "Конфигурация успешно сохранена");
}

} else if (!bFoundSec || bErrorFindSect) {
client_print(id, print_chat, "Конфигурация не сохранена. Не верно выбрано имя.");

} else if (!bFoundPar || bErrorFindParam) {
client_print(id, print_chat, "Конфигурация не сохранена. Не верно указан параметр.");
}
}
}

public csdm_Init(const version[])
{
if (version[0] == 0) {
set_fail_state("ReCSDM failed to load.");
return;
}
}

public csdm_CfgInit()
{
csdm_reg_cfg("settings", "read_cfg");
}

public plugin_init()
{
register_plugin(D_PLUGIN, CSDM_VERSION, "ReCSDM Team");

register_clcmd("say respawn", "say_respawn");
register_clcmd("say /respawn", "say_respawn");

register_clcmd("csdm_menu", "csdm_menu", ADMIN_MENU, "CSDM Меню");
register_clcmd("csdm_sett_menu", "csdm_sett_menu", ADMIN_MENU, "Меню настроек CSDM");
register_clcmd("csdm_main_sett_menu", "csdm_main_sett_menu", ADMIN_MENU, "Меню основных настроек CSDM");

register_concmd("csdm_enable", "csdm_enable", D_ACCESS, "Включить CSDM");
register_concmd("csdm_disable", "csdm_disable", D_ACCESS, "Выключить CSDM");
register_concmd("csdm_ctrl", "csdm_ctrl", D_ACCESS, "");
register_concmd("csdm_reload", "csdm_reload", D_ACCESS, "Перезагрузить конфигурацию CSDM");
register_concmd("csdm_cache", "cacheInfo", ADMIN_MAP, "Показать кешированную информацию");

AddMenuItem("CSDM Menu", "csdm_menu", D_ACCESS, D_PLUGIN);
g_MainMenu = menu_create("CSDM Menu", "use_csdm_menu");

new callback = menu_makecallback("hook_item_display");

g_SettingsMenu = menu_create("CSDM Settings Menu", "use_csdm_sett_menu");
menu_additem(g_MainMenu, "CSDM [вкл/выкл]", "csdm_ctrl", D_ACCESS, callback);
menu_additem(g_MainMenu, "Настройки CSDM", "csdm_sett_menu", D_ACCESS);
menu_additem(g_MainMenu, "Перезагрузить конфигурацию", "csdm_reload", D_ACCESS);

g_MainSettMenu = menu_create("Меню основных настроек CSDM", "use_csdm_mainsett_menu");
menu_additem(g_SettingsMenu, "Основные настройки CSDM", "csdm_main_sett_menu", D_ACCESS);

if (g_MainSettMenu)
{
new str_callback = menu_makecallback("hook_settings_display");

menu_additem(g_MainSettMenu, "Скрывать оружие [вкл/выкл]", "strip_weap_ctrl", D_ACCESS, str_callback);
menu_additem(g_MainSettMenu, "Удалять бомбу [вкл/выкл]", "bomb_rem_ctrl", D_ACCESS, str_callback);
menu_additem(g_MainSettMenu, "Пердустановленные места возрождения [вкл/выкл]", "spawn_mode_ctrl", D_ACCESS, str_callback);
menu_additem(g_MainSettMenu, "Назад", "csdm_sett_back", D_ACCESS);
}

g_drop_fwd = CreateMultiForward("csdm_HandleDrop", ET_CONTINUE, FP_CELL, FP_CELL, FP_CELL);
g_options[CSDM_OPTION_SAYRESPAWN] = CSDM_SET_ENABLED;

g_max_clients = get_maxplayers();

if(get_cvar_num("csdm_block_drop_weapon") != 1) {
register_forward(FM_SetModel, "forward_set_model");
}
}

public cacheInfo(id)
{
if(!(get_user_flags(id) & ADMIN_MAP)) {
return PLUGIN_HANDLED;
}

new ar[6];
csdm_cache(ar);

console_print(id, "[ReCSDM] Free tasks: respawn=%d, findweapon=%d", ar[0], ar[5]);
console_print(id, "[ReCSDM] Weapon removal cache: %d total, %d live", ar[4], ar[3]);
console_print(id, "[ReCSDM] Live tasks: %d (%d free)", ar[2], ar[1]);

return PLUGIN_HANDLED;
}

public csdm_PreSpawn(id, bool:fake)
{
if (!csdm_active()) {
return;
}

new useShield = cs_get_user_shield(id);

if (useShield) {
return;
}

new team = _:cs_get_user_team(id);

if (g_StripWeapons)
{
if (team == _TEAM_T)
{
if (useShield) {
drop_with_shield(id, CSW_GLOCK18);
} else {
csdm_force_drop(id, "weapon_glock18");
}

} else if (team == _TEAM_CT) {

if (useShield) {
drop_with_shield(id, CSW_USP);
} else {
csdm_force_drop(id, "weapon_usp");
}
}
}

if (g_RemoveBomb && team == _TEAM_T)
{
new weapons[MAX_WEAPONS], num, i;
get_user_weapons(id, weapons, num);

for (i = 0; i < num; i++)
{
if (weapons[i] == CSW_C4)
{
if (useShield) {
drop_with_shield(id, CSW_C4);
} else {
csdm_force_drop(id, "weapon_c4");
}

break;
}
}
}
}

public csdm_main_sett_menu(id)
{
if( !(get_user_flags(id) & ADMIN_MENU) ) {
return PLUGIN_HANDLED;
}

menu_display(id, g_MainSettMenu, 0);

return PLUGIN_HANDLED;
}

public hook_item_display(player, menu, item)
{
new paccess, command[24], call;

menu_item_getinfo(menu, item, paccess, command, charsmax(command), _, 0, call);

if (equali(command, "csdm_ctrl"))
{
if (!csdm_active()) {
menu_item_setname(menu, item, "CSDM Выключен");
} else {
menu_item_setname(menu, item, "CSDM Включен");
}
}
}

public read_cfg(readAction, line[], section[])
{
if (readAction == CFG_READ)
{
new setting[24], sign[3], value[32];

parse(line, setting, charsmax(setting), sign, charsmax(sign), value, charsmax(value));

if (equali(setting, "strip_weapons")) {
g_StripWeapons = str_to_num(value) ? true : false;

} else if (equali(setting, "weapons_stay")) {
g_StayTime = str_to_num(value);

}
else if (equali(setting, "spawnmode"))
{
new var = csdm_setstyle(value);

if (var) {
log_amx("CSDM spawn mode set to %s", value);
} else {
log_amx("CSDM spawn mode %s not found", value);
}

} else if (equali(setting, "remove_bomb")) {
g_RemoveBomb = str_to_num(value) ? true : false;

} else if (equali(setting, "enabled")) {
csdm_set_active(str_to_num(value));

} else if (equali(setting, "spawn_wait_time")) {
csdm_set_spawnwait(str_to_float(value));
}
}
}

public csdm_reload(id)
{
if( !(get_user_flags(id) & D_ACCESS) ) {
return PLUGIN_HANDLED;
}

if (csdm_reload_cfg(g_filename)) {
client_print(id, print_chat, "Конфигурация перезагруженна из файла.");
} else {
client_print(id, print_chat, "Не найден файл конфигурации.");
}

return PLUGIN_HANDLED;
}

public csdm_menu(id)
{
if( !(get_user_flags(id) & ADMIN_MENU) ) {
return PLUGIN_HANDLED;
}

menu_display(id, g_MainMenu, 0);

return PLUGIN_HANDLED;
}

public csdm_sett_menu(id)
{
if( !(get_user_flags(id) & ADMIN_MENU) ) {
return PLUGIN_HANDLED;
}

menu_display(id, g_SettingsMenu, 0);

return PLUGIN_HANDLED;
}

public csdm_ctrl(id)
{
if( !(get_user_flags(id) & D_ACCESS) ) {
return PLUGIN_HANDLED;
}

csdm_set_active( csdm_active() ? 0 : 1);
client_print(id, print_chat, "CSDM %s.", csdm_active()? "Включен" : "Выключен");
csdm_write_cfg(id, "settings", "enabled", csdm_active() ? "1" : "0");
client_print(id, print_chat, "Карта будет перезагружена, что бы применить эти изменения.");
set_task(3.0, "do_changelevel");

return PLUGIN_HANDLED;
}

public use_csdm_menu(id, menu, item)
{
if (item < 0)
return PLUGIN_CONTINUE;

new command[24], paccess, call;

if (!menu_item_getinfo(g_MainMenu, item, paccess, command, charsmax(command), _, 0, call)) {
log_amx("Error: csdm_menu_item() failed (menu %d) (page %d) (item %d)", g_MainMenu, 0, item);
return PLUGIN_HANDLED;
}

if (paccess && !(get_user_flags(id) & paccess)) {
client_print(id, print_chat, "У вас нет доступа к этой опции.");
return PLUGIN_HANDLED;
}

if(item == 0) {
csdm_ctrl(id);

} else if(item == 1) {
csdm_sett_menu(id);

} else if(item == 2) {
csdm_reload(id);

} else if(item == 3) {
send_client_cmd(id, command);
}

return PLUGIN_HANDLED;
}

public use_csdm_sett_menu(id, menu, item)
{
if (item < 0)
return PLUGIN_CONTINUE;

new command[24], paccess, call;

if (!menu_item_getinfo(g_SettingsMenu, item, paccess, command, charsmax(command), _, 0, call)) {
log_amx("Error: csdm_menu_item() failed (menu %d) (page %d) (item %d)", g_SettingsMenu, 0, item);
return PLUGIN_HANDLED;
}

if (paccess && !(get_user_flags(id) & paccess)) {
client_print(id, print_chat, "У вас нет доступа к этой опции.");
return PLUGIN_HANDLED;
}

if(item == 0) {
csdm_main_sett_menu(id);
} else {
send_client_cmd(id, command);
}

return PLUGIN_HANDLED;
}

public use_csdm_mainsett_menu(id, menu, item)
{
if (item < 0)
return PLUGIN_CONTINUE;

new command[24], paccess, call;

if (!menu_item_getinfo(g_MainSettMenu, item, paccess, command, charsmax(command), _, 0, call)) {
log_amx("Error: csdm_menu_item() failed (menu %d) (page %d) (item %d)", g_MainSettMenu, 0, item);
return PLUGIN_HANDLED;
}

if (paccess && !(get_user_flags(id) & paccess)) {
client_print(id, print_chat, "У вас нет доступа к этой опции.");
return PLUGIN_HANDLED;
}

if (equali(command,"strip_weap_ctrl")) {
g_StripWeapons = (g_StripWeapons ? false:true);
menu_display(id, g_MainSettMenu, 0);
client_print(id, print_chat, "Скрытие оружия %s", g_StripWeapons ? "Включено" : "Выключено");
log_amx("CSDM strip weapons %s", g_StripWeapons ? "enabled" : "disabled");
csdm_write_cfg(id, "settings", "strip_weapons", g_StripWeapons ? "1" : "0");
return PLUGIN_HANDLED;

} else if (equali(command,"bomb_rem_ctrl")) {
g_RemoveBomb = (g_RemoveBomb ? false:true);
menu_display(id, g_MainSettMenu, 0);
client_print(id, print_chat, "Удаление бомбы %s", g_RemoveBomb ? "Включено" : "Выключено");
log_amx("CSDM removing bomb %s", g_RemoveBomb ? "enabled" : "disabled");
csdm_write_cfg(id, "settings", "remove_bomb", g_RemoveBomb ? "1" : "0");
client_print(id,print_chat,"Данные изменения вступят в силу после смены карты.");
return PLUGIN_HANDLED;

} else if (equali(command,"spawn_mode_ctrl")) {

new stylename[24], style = csdm_curstyle();

if (style == -1) {
csdm_setstyle("preset");
} else {
csdm_setstyle("none");
}

style = csdm_curstyle();

if (style == -1) {
formatex(stylename, charsmax(stylename),"none");
} else {
formatex(stylename, charsmax(stylename),"preset");
}

menu_display(id, g_MainSettMenu, 0);
client_print(id, print_chat, "Режим возрождения игроков установлен как %s", stylename);
log_amx("CSDM spawn mode set to %s", stylename);
csdm_write_cfg(id, "settings", "spawnmode", (style == -1) ? "none" : "preset");

return PLUGIN_HANDLED;

} else if (equali(command,"csdm_sett_back")) {
menu_display(id, g_SettingsMenu, 0);
return PLUGIN_HANDLED;
}

return PLUGIN_HANDLED;
}

public hook_settings_display(player, menu, item)
{
new paccess, command[24], call;

menu_item_getinfo(menu, item, paccess, command, charsmax(command), _, 0, call);

if (equali(command, "strip_weap_ctrl"))
{
if (!g_StripWeapons) {
menu_item_setname(menu, item, "Скрытие оружия отключено");
} else {
menu_item_setname(menu, item, "Скрытие оружия включено");
}

} else if (equali(command, "bomb_rem_ctrl")) {

if (!g_RemoveBomb) {
menu_item_setname(menu, item, "Удаление бомбы отключено");
} else {
menu_item_setname(menu, item, "Удаление бомбы включено");
}

} else if (equali(command,"spawn_mode_ctrl")) {

new style = csdm_curstyle();

if (style == -1) {
menu_item_setname(menu, item, "Предустановленные точки возрождения включены");
} else {
menu_item_setname(menu, item, "Предустановленные точки возрождения выключены");
}
}
}

public csdm_enable(id)
{
if(!(get_user_flags(id) & D_ACCESS)) {
return PLUGIN_HANDLED;
}

if (!csdm_active()) {
csdm_set_active(1);
client_print(id, print_chat, "CSDM включен.");
csdm_write_cfg(id, "settings", "enabled", "1");
client_print(id, print_chat, "Эти настройки вступят в силу после смены карты.");
set_task(3.0, "do_changelevel");
}

return PLUGIN_HANDLED;
}

public csdm_disable(id)
{
if( !(get_user_flags(id) & D_ACCESS) ) {
return PLUGIN_HANDLED;
}

if (csdm_active()) {
csdm_set_active(0);
client_print(id, print_chat, "CSDM выключен.");
csdm_write_cfg(id, "settings", "enabled", "0");
client_print(id, print_chat, "Эти настройки вступят в силу после смены карты.");
set_task(3.0, "do_changelevel");
}

return PLUGIN_HANDLED;
}

public say_respawn(id)
{
if (g_options[CSDM_OPTION_SAYRESPAWN] == CSDM_SET_DISABLED || !csdm_active()) {
client_print(id, print_chat, "Эта команда отключена!");
return PLUGIN_HANDLED;
}

if (!is_user_alive(id))
{
new team = _:cs_get_user_team(id);

if (team == _TEAM_T || team == _TEAM_CT) {
csdm_respawn(id);
}
}

return PLUGIN_CONTINUE;
}

public do_changelevel()
{
new current_map[32];
get_mapname(current_map, charsmax(current_map));

if(is_map_valid(current_map)) {
server_cmd("changelevel %s", current_map);
}
}

public forward_set_model(ent, const model[])
{
if (!csdm_active()) {
return FMRES_IGNORED;
}

if (!pev_valid(ent) || (!equali(model, g_wbox_model) && !equali(model, g_shield_model))) {
return FMRES_IGNORED;
}

static id, args[2];

id = pev(ent, pev_owner);

if (!(1 <= id <= g_max_clients)) {
return FMRES_IGNORED;
}

args[0] = ent;
args[1] = id;

set_task(0.2, "delay_find_weapon", ent, args, 2);

return FMRES_IGNORED;
}

public delay_find_weapon(args[])
{
static ent, id;

ent = args[0];
id = args[1];

if (!pev_valid(ent) || !is_user_connected(id)) {
return;
}

new class[15];

pev(ent, pev_classname, class, charsmax(class));

if (equali(class, "weaponbox")) {
run_drop_wbox(id, ent, 0);
} else if (equali(class, "weapon_shield")) {
run_drop_wbox(id, ent, 1);
}
}

stock run_drop_wbox(id, ent, shield)
{
static ret;

ExecuteForward(g_drop_fwd, ret, id, ent, 0);

if (ret == CSDM_DROP_REMOVE)
{
if (shield) {
csdm_remove_weaponbox(id, ent, 0, 1, 1);
} else {
csdm_remove_weaponbox(id, ent, 0, 1, 0);
}

return 1;

} else if (ret == CSDM_DROP_IGNORE) {
return 0;
}

if (g_StayTime > 20 || g_StayTime < 0) {
return 0;
}

if (ent)
{
new model[23];

pev(ent, pev_model, model, charsmax(model));

if (g_StripWeapons)
{
if(equali(model,"models/w_usp.mdl") || equali(model,"models/w_glock18.mdl")) {
csdm_remove_weaponbox(id, ent, 0, 0, 0);
}

}
else if (g_RemoveBomb)
{
if(equali(model,"models/w_backpack.mdl")) {
csdm_remove_weaponbox(id, ent, 0, 0, 0);
}

} else if (shield) {
csdm_remove_weaponbox(id, ent, g_StayTime, 1, 1);
} else {
csdm_remove_weaponbox(id, ent, g_StayTime, 1, 0);
}

return 1;
}

return 0;
}
Всем привет. Подскажите , из за чего может возникать данная ошибка?
 
В этой теме было размещено решение! Перейти к решению.

Вложения

  • 11.1 KB Просмотры: 336
Сообщения
162
Реакции
4
Помог
3 раз(а)
Как одно из решений удалить строку
Код:
AddMenuItem("CSDM Menu", "csdm_menu", D_ACCESS, D_PLUGIN);
из sma. Тему можно закрыть.
 
Статус
В этой теме нельзя размещать новые ответы.

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

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