Ошибка Bomb Taker

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
16
Реакции
0
Ошибка
L 05/13/2022 - 21:47:35: [ReAPI] get_member_s: 'm_C4_bStartedArming' has no refs to the base class of an entity 'weapon_m4a1'
L 05/13/2022 - 21:47:35: [AMXX] Displaying debug trace (plugin "c4_taker.amxx", version "0.0.2b")
L 05/13/2022 - 21:47:35: [AMXX] Run time error 10: native error (native "get_member_s")
L 05/13/2022 - 21:47:35: [AMXX] [0] bomb_taker.sma::CanUseThisPlayer (line 127)
L 05/13/2022 - 21:47:35: [AMXX] [1] bomb_taker.sma::Event_StatusValue_Show (line 110)
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0-dev+5210 (http://www.amxmodx.org)
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.11.0.776-dev
Build date: 18:10:15 Apr 26 2022 (2936)
Build from: https://github.com/dreamstalker/rehlds/commit/3dc9f8c
ReGamedll
ReGameDLL version: 5.21.0.546-dev
Версия Metamod
Metamod v1.21p37  2013/05/30 (5:13)
Список метамодулей
[ 1] Reunion          RUN   -    reunion_mm_i386.  v0.1.92d  ini   Start Never
[ 2] VoiceTranscoder RUN - VoiceTranscoder. v2017RC5 ini ANY ANY
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0-d ini Start ANY
[ 4] Rechecker RUN - rechecker_mm_i38 v2.7 ini Chlvl ANY
[ 5] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i38 v1.5.697 ini Chlvl ANY
[ 8] Hide Cvars RUN - hidecvars_amxx_i v1.0 pl3 ANY ANY
[ 9] ReAimDetector RUN - reaimdetector_am v0.2.2 pl3 ANY Never
[10] IPHub Client RUN - iphubclient_amxx v1.0.1 pl3 ANY Never
[11] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl3 ANY ANY
[12] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl3 ANY ANY
[13] Engine RUN - engine_amxx_i386 v1.9.0.5 pl3 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl3 ANY ANY
[15] VTC AMXX API RUN - VtcApi_amxx_i386 v2017 RC pl3 ANY ANY
[16] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl3 ANY ANY
[17] ReAPI RUN - reapi_amxx_i386. v5.21.0. pl3 ANY Never
[18] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[19] GeoIP RUN - geoip_amxx_i386. v1.9.0.5 pl3 ANY ANY
[20] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl3 ANY ANY
20 plugins, 20 running
Список плагинов
amxx plugins
Currently loaded plugins:
name version author file status
[ 1] FreshBans 1.4.6b kanagava fresh_bans_146- running
[ 2] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 3] Menus Front-End 20.06.06 SKAJIbnEJIb & AM amxmodmenu_rbs. running
[ 4] Player Votes 1.0 neugomon player_votes.am running
[ 5] [190] High Ping Kicker 20.06.06 SKAJIbnEJIb hpk_rbs.amxx running
[ 6] GameCMS_API 5.3.5 zhorzh78 gamecms_api_5.3 running
[ 7] Voice Manager 1.6 Stimul 5sek.amxx running
[ 8] [VTC][183] Ultimate Ga 17.08.28 SKAJIbnEJIb ultimate_gag_vt running
[ 9] [190] Ultimate Gag 21.01.02BE SKAJIbnEJIb ultimate_gag.am running
[ 10] Night Mode 1.2.3 Radius night_mode.amxx running
[ 11] Map Manager: Core 3.1.4 Mistrick map_manager_cor running
[ 12] Map Manager: Scheduler 0.1.9 Mistrick map_manager_sch running
[ 13] Admin Mapmenu 0.5.3 d3m37r4 admin_mapmenu.a running
[ 14] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 15] Map Manager: Nominatio 0.2.0 Mistrick map_manager_nom running
[ 16] Map Manager: BlockList 0.0.4 Mistrick map_manager_blo running
[ 17] Map Manager: Online so 0.0.4 Mistrick map_manager_onl running
[ 18] Map Manager: Effects 0.1.0 Mistrick map_manager_eff running
[ 19] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 20] Map Manager: Advanced 0.1.0 Mistrick map_manager_adv running
[ 21] Map Manager: Sounds 0.0.1 Mistrick map_manager_sou running
[ 22] GameCMS BonusSystem 1.1 +- DUKKHAZ0R gamecms_bonus.a running
[ 23] CMSGive_RegFlags 1.0 ApXuTekToR CMSGive_RegFlag running
[ 24] [190] Ultimate Models 21.03.23 SKAJIbnEJIb ultimate_models running
[ 25] [190] Map Spawns Edito 20.06.06 SKAJIbnEJIb & iG MapSpawnsEditor running
[ 26] Bomb Taker 0.0.2b Vaqtincha c4_taker.amxx debug
[ 27] [190] AdminChat RBS 20.06.06 SKAJIbnEJIb adminchat_rbs.a running
[ 28] [182] RestMenu RBS 17.09.14 SKAJIbnEJIb & AM restmenu_rbs.am running
[ 29] [190] CsStats MySQL 20.06.06 SKAJIbnEJIb csstats_mysql.a running
[ 30] [190] StatsX RBS 21.03.23 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 31] [190] Stats Configurat 20.06.06 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 32] Server Controller 1.2 MakapoH. server_controll stopped
[ 33] New Kick Menu 1.3.2 Radius newkickmenu.amx running
[ 34] [190] Army Ranks Ultim 20.06.06 SKAJIbnEJIb army_ranks_ulti running
[ 35] [190] BonusMenu RBS 20.06.06 SKAJIbnEJIb bonusmenu_rbs.a running
[ 36] [182] BuyMenu RBS 21.03.23 SKAJIbnEJIb buymenu_rbs.amx running
[ 37] [190] C4 Destroyer 21.03.23 SKAJIbnEJIb c4_destroyer.am running
[ 38] [190] Maps Helper 20.06.06 SKAJIbnEJIb maps_helper.amx running
[ 39] [190] Ultimate Informe 21.03.23 SKAJIbnEJIb ultimate_inform running
[ 40] [190] Skill ELO 20.06.06 SKAJIbnEJIb skill_elo.amxx running
[ 41] [190] Chat RBS 20.06.06 SKAJIbnEJIb chat_rbs.amxx running
[ 42] [190] Chat Addons 20.06.06 SKAJIbnEJIb chat_addons.amx running
[ 43] [190] Analizator 20.06.06 SKAJIbnEJIb analizator.amxx running
[ 44] [190] BonusTime RBS 20.08.08 SKAJIbnEJIb bonustime_rbs.a running
[ 45] [190] Snipers RBS 20.06.06 SKAJIbnEJIb snipers_rbs.amx running
[ 46] Revive Players 1.0.0 Emma Jule acrevive_teamma running
[ 47] [ReAPI] Healthnade 0.1.7 F@nt0M + mx?! reapi_healthnad running
[ 48] [ReAPI] TopRoundDamage 1.0.6 Dager* *.* -G- damage_round.am running
[ 49] Color Flash Screen 1.4.3 Radius (Stimul i color_flash_scr running
[ 50] [182] AdminCmd RBS 20.06.06 SKAJIbnEJIb & AM admincmd_rbs.am running
[ 51] [190] Blind RBS 20.06.06 SKAJIbnEJIb blind_rbs.amxx running
[ 52] [182] Ultimate Weapons 21.03.23 SKAJIbnEJIb ultimate_weapon running
[ 53] [182] VIP RBS 20.07.20 SKAJIbnEJIb vip_rbs.amxx running
[ 54] [ReAPI] Random Weapons 2.4.9 neugomon/h1k3 warmup.amxx running
[ 55] [190] Damager RBS 20.06.06 SKAJIbnEJIb damager_rbs.amx running
[ 56] [190] Screen Player 20.06.06 SKAJIbnEJIb screen_player.a running
[ 57] C4 Timer on roundtime 0.3.3a neygomon c4timer.amxx running
[ 58] [190] CmdMenu RBS 20.06.06 SKAJIbnEJIb & AM cmdmenu_rbs.amx running
[ 59] Reset Score 1.0 M1 TEAM ResetScore.amxx running
[ 60] GameName Changer 1.0 neugomon GameNameChanger running
[ 61] Parachute 1.1 ReHLDS Team parachute.amxx running
[ 62] [190] ESP RBS 20.06.06 SKAJIbnEJIb & Ko esp_rbs.amxx running
[ 63] [190] WallHack Viewer 20.06.06 SKAJIbnEJIb wallhack_viewer running
[ 64] Auto RR 0.1 Sokrat auto_rest.amxx running
[ 65] [190] Ad From Server 20.06.06 SKAJIbnEJIb ad_from_server. running
[ 66] [190] DemoRecorder RBS 20.06.06 SKAJIbnEJIb demorecorder_rb running
[ 67] [190] AfkKicker RBS 20.08.02 SKAJIbnEJIb afkkicker_rbs.a running
[ 68] [190] Bets RBS 20.06.06 SKAJIbnEJIb bets_rbs.amxx running
[ 69] Money 1.1 M1 TEAM money.amxx running
[ 70] Weapon Icon 1.0 M1 TEAM weapon_icon.amx running
[ 71] HS Sound 1.0 M1 TEAM headshot.amxx running
[ 72] Kills Counter CS-RAIN 1.0 Leo_[BH] kills_counter.a running
[ 73] TOP VIP 1.0a Leo_[BH] top_vip.amxx running
[ 74] Block grande info 1.0 neygomon BlockGrenadeInf running
[ 75] [ReAPI] KiLL Assist poka_4to_b PRoSToTeM@ Kill_assist_rea running
[ 76] [190] Ultimate Flags 20.06.06 SKAJIbnEJIb ultimate_flags. running
[ 77] Replace Info Message 2.3 M1 TEAM replace_info_ms running
[ 78] [190] SlayLosers RBS 20.06.06 SKAJIbnEJIb & d3 slaylosers_rbs. running
[ 79] [reAPI] Flash Control 1.1 neugomon flash_control.a running
[ 80] Flash Bug Fix 1.0.0 F@nt0M flash_fix.amxx running
[ 81] Top Bomber 0.1.1 Albertio top_bomber.amxx running
[ 82] Walls Creator 1.1 d3m37r4 walls_creator.a running
[ 83] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 84] [ReAPI] Silly C4 2.0 F@ntoM & Cheap_S reapi_sillyc4.a running
[ 85] NameChangeTime 0.0.1 Vaqtincha block_change_ni running
[ 86] Stop the Bastards 1.7.0 F@nt0M stop_the_bastar running
[ 87] [190] Block Reconnect 20.06.06 ShaTalKiN Block_Reconnect running
[ 88] Weapon Kill No Suicide 1.2 Slove. & AcE no_suicide_weap running
[ 89] recoil_manager 1.0.0 fl0wer recoil_manager. running
[ 90] HolyGrenade: Core 1.0 CHEL74 holygrenade_cor running
[ 91] Holygrenade: Addon 1.0 CHEL74 holygrenade_spa running
[ 92] Fake Ping 1.1 MeRcyLeZZ/gyxoBk FakePing.amxx running
[ 93] unknown unknown unknown spam_block_1.am running
[ 94] unknown unknown unknown spam_block_2.am running
[ 95] Mode 2x2 2.5re s1lent mode.amxx running
[ 96] Defuser Icon New Color 1.0.1 Leo_[BH] defuser_color.a running
[ 97] BuyZone Icon New Color 1.0.1 Leo_[BH] bz_color.amxx running
[ 98] C4 Icon New Color 1.0.1 Leo_[BH] c4_color.amxx running
98 plugins, 97 running
Автор плагина
Vaqtincha
Версия плагина
0.0.2b
Исходный код
// Copyright © 2017 Vaqtincha

// Original Plugin Authors "joaquimandrade and ConnorMcLeod"

/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG START ■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

#define TAKE_ACCESS ADMIN_LEVEL_G // Игрок с этим флагом может всегда могут забрать бомбу от всех
// (кроме от игроков с тем же флагом)

#define MAX_FLOOD_TOUCH 7 // Защита от флуда "дроп/пикап"
#define MAX_WAIT_TIME 15 // Время ожидание плента после которого можно взять бомбу от игрока
// #define ALWAYS_TAKE_BOTS // Игнорировать PLAYER_MAX_WAIT_TIME у ботов (все игроки всегда могут взять бомбу от ботов)

// HUD
#define INFO_HUD_POSITION -1.0, 0.40 // Позиция худ информера
#define INFO_HUD_COLOR 125, 110, 200 // Цвет худ информера

/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG END ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

#include <amxmodx>
#include <reapi>
#include <hamsandwich>


#define PL_VERSION "0.0.2b"

#define PLAYER_USE_RADIUS 75

new g_iHudSync, Float:g_flBombGiveTime[MAX_CLIENTS + 1], g_iCountTouch[MAX_CLIENTS + 1]


public plugin_init()
{
register_plugin("Bomb Taker", PL_VERSION, "Vaqtincha")

if(bool:get_member_game(m_bMapHasBombTarget))
{
RegisterHookChain(RG_RoundEnd, "RoundEnd", .post = true)

RegisterHam(Ham_ObjectCaps, "bot", "CBasePlayer_ObjectCaps", .Post = false)
RegisterHam(Ham_ObjectCaps, "player", "CBasePlayer_ObjectCaps", .Post = false)
RegisterHam(Ham_Use, "bot", "CBasePlayer_PlayerUse", .Post = true)
RegisterHam(Ham_Use, "player", "CBasePlayer_PlayerUse", .Post = true)
RegisterHam(Ham_Item_AddToPlayer, "weapon_c4", "CBasePlayerItem_AddToPlayer", .Post = true)

register_event("StatusValue", "Event_StatusValue_Show", "be", "1=3"/*HEALTH*/, "2>0")
register_event("StatusValue", "Event_StatusValue_Hide", "b", "1=1", "2=0")

g_iHudSync = CreateHudSyncObj()
}
else {
pause("ad")
}
}

public client_putinserver(pPlayer)
{
g_iCountTouch[pPlayer] = 0
g_flBombGiveTime[pPlayer] = 0.0
}

public RoundEnd(const WinStatus:status, const ScenarioEventEndRound:event, const Float:tmDelay)
{
arrayset(any:g_flBombGiveTime, any:-1.0, sizeof(g_flBombGiveTime))
arrayset(g_iCountTouch, 0, sizeof(g_iCountTouch))
}


public CBasePlayerItem_AddToPlayer(const pItem, const pPlayer)
{
g_iCountTouch[pPlayer]++

if(g_iCountTouch[pPlayer] == 1) {
g_flBombGiveTime[pPlayer] = get_gametime()
}
}

public CBasePlayer_ObjectCaps(const pPlayer)
{
SetHamReturnInteger(FCAP_ONOFF_USE)
return HAM_SUPERCEDE
}


public CBasePlayer_PlayerUse(const pPlayer, const pActivator, const pCaller, const use_type, const Float:value)
{
if(value == 0.0 || !is_user_alive(pActivator) || get_member(pActivator, m_iTeam) != TEAM_TERRORIST)
return

if(is_user_alive(pPlayer) && CanUseThisPlayer(pPlayer, pActivator))
{
rg_transfer_c4(pPlayer, pActivator)
g_iCountTouch[pPlayer] = 0
g_flBombGiveTime[pPlayer] = 0.0
}
}

public Event_StatusValue_Hide(const pPlayer) {
ClearSyncHud(pPlayer, g_iHudSync)
}

public Event_StatusValue_Show(const pPlayer)
{
if(get_member(pPlayer, m_iTeam) != TEAM_TERRORIST)
return

new pTarget, iBody
get_user_aiming(pPlayer, pTarget, iBody, PLAYER_USE_RADIUS)

if(pTarget > 0 && iBody > 0 && is_user_alive(pTarget) && CanUseThisPlayer(pTarget, pPlayer))
{
set_hudmessage(INFO_HUD_COLOR, INFO_HUD_POSITION, .holdtime = 1.5, .fadeintime = 0.5, .fadeouttime = 0.5)
ShowSyncHudMsg(pPlayer, g_iHudSync, "Нажмите ^"E^" чтобы взять бомбу")
}
else {
ClearSyncHud(pPlayer, g_iHudSync)
}
}

stock bool:CanUseThisPlayer(const pPlayer, const pTaker)
{
if(!get_member(pPlayer, m_bHasC4))
return false

new pWeapon = get_member(pPlayer, m_pActiveItem)

if(!is_nullent(pWeapon) && get_member(pWeapon, m_C4_bStartedArming))
return false

#if defined ALWAYS_TAKE_BOTS
if(is_user_bot(pPlayer))
return true
#endif
#if defined TAKE_ACCESS
if((get_user_flags(pTaker) & TAKE_ACCESS) && !(get_user_flags(pPlayer) & TAKE_ACCESS))
return true
#else
#pragma unused pTaker
#endif
return bool:((g_iCountTouch[pPlayer] >= MAX_FLOOD_TOUCH) || ((get_gametime() - g_flBombGiveTime[pPlayer]) > MAX_WAIT_TIME.0))
}
После обновления ReAPI на 21 версию приключилась беда
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
397
Реакции
221
Помог
13 раз(а)

Вложения

  • 4.6 KB Просмотры: 81
Сообщения
3,582
Реакции
1,570
Помог
137 раз(а)
Mypp, добавьте в начало файла (до инклудов) #define MEMBER_UNSAFE
 
Сообщения
16
Реакции
0
b0t., Nordic Warrior, также выписывает:

L 05/15/2022 - 02:13:40: [ReAPI] get_member_s: 'm_C4_bStartedArming' has no refs to the base class of an entity 'weapon_knife'
L 05/15/2022 - 02:13:40: [AMXX] Displaying debug trace (plugin "c4_taker.amxx", version "0.0.2b")
L 05/15/2022 - 02:13:40: [AMXX] Run time error 10: native error (native "get_member_s")
L 05/15/2022 - 02:13:40: [AMXX] [0] _.sma::CanUseThisPlayer (line 127)
L 05/15/2022 - 02:13:40: [AMXX] [1] _.sma::Event_StatusValue_Show (line 110)
 

RockTheStreet

Саппорт года
Сообщения
1,743
Реакции
344
Помог
40 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
Mypp, Потому что после редактирования исходника необходимо заново его скомпилировать. После скомпилированный файл загрузить на сервер.
 
Сообщения
1,293
Реакции
2,293
Помог
57 раз(а)
Код:
-if(!is_nullent(pWeapon) && get_member(pWeapon, m_C4_bStartedArming))
+if(!is_nullent(pWeapon) && get_member(pWeapon, m_iId) == WEAPON_C4 && get_member(pWeapon, m_C4_bStartedArming))
 
  • Нравится
Реакции: Ayk
Сообщения
397
Реакции
221
Помог
13 раз(а)
BlackSignature, последовательность проверки тоже влияет?
В файле, что я скинул такая же проверка, только последовательность другая:

Код:
if(!is_nullent(pWeapon) && get_member(pWeapon, m_C4_bStartedArming) && get_member(pWeapon, m_iId) == WEAPON_C4)
 
Сообщения
3,582
Реакции
1,570
Помог
137 раз(а)
b0t., разумеется влияет. Твой вариант не рабочий. Проверки осуществляются слева направо.
 
Сообщения
397
Реакции
221
Помог
13 раз(а)
Nordic Warrior, то как они идут я знаю, но разве не должно быть так, что пока все условия в проверке не совпадут, то и код ниже работать не будет?
Или же в проверке вызывается
Код:
get_member(pWeapon, m_C4_bStartedArming)
Выдаёт ошибку и проверка дальше не идёт? Если да, то теперь понял и вопросов не имею
 
Статус
В этой теме нельзя размещать новые ответы.

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

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