Участник
Пользователь
- Сообщения
- 272
- Реакции
- 14
- Ошибка
-
[ReAPI] AdminFreeLook - Плагин не работает
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.10.0.5467
- Билд
-
ReHLDS version: 3.13.0.788-dev
- ReGamedll
-
ReGameDLL version: 5.26.0.668-dev
- Версия Metamod
-
Metamod-r v1.3.0.149
- Список метамодулей
-
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.2 Beta 3 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.2.0.13 ini Start Never
[ 3] Revoice RUN - revoice_mm_i386.so v0.1.0.34 ini Start Never
[ 4] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 5] Rechecker RUN - rechecker_mm_i386.so v2.7 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 7] ReSemiclip RUN - resemiclip_mm_i386.so v2.4.3 ini Chlvl ANY
[ 8] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5467 ini Start ANY
[ 9] HitBox Fix RUN - hitbox_fix_mm_i386.so v1.1.5 ini Start ANY
[10] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl8 ANY Never
[11] ReAPI RUN - reapi_amxx_i386.so v5.24.0.300-dev pl8 ANY Never
[12] Engine RUN - engine_amxx_i386.so v1.10.0.5467 pl8 ANY ANY
[13] FakeMeta RUN - fakemeta_amxx_i386.so v1.10.0.5467 pl8 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.10.0.5467 pl8 ANY ANY
[15] MySQL RUN - mysql_amxx_i386.so v1.10.0.5467 pl8 ANY ANY
[16] GeoIP RUN - geoip_amxx_i386.so v1.10.0.5467 pl8 ANY ANY
[17] CSX RUN - csx_amxx_i386.so v1.10.0.5467 pl8 ANY ANY
[18] gRIP RUN - grip_amxx_i386.so v0.1.5 Beta pl8 ANY ANY
- Список плагинов
-
[ 1] 0 Multi-Lingual System 1.10.0.546 AMXX Dev Team multilingua running
[ 2] 1 ReAimDetector API 0.2.2 ReHLDS Team reaimdetect running
[ 3] 2 [190] Ultimate Weapons 24.10.08BE SKAJIbnEJIb unknown ultimate_we running
[ 4] 3 [190] AMXBans RBS 24.09.09BE SKAJIbnEJIb & La unknown amxbans_rbs running
[ 5] 4 Menus Front-End 20.06.06 SKAJIbnEJIb & AM unknown amxmodmenu_ running
[ 6] 5 [190] AdminCmd RBS 22.11.15 SKAJIbnEJIb & AM unknown admincmd_rb running
[ 7] 6 [190] Screen Player 24.10.10BE SKAJIbnEJIb unknown screen_play running
[ 8] 7 [190] Blind RBS 22.12.07BE SKAJIbnEJIb unknown blind_rbs.a running
[ 9] 8 [190] ESP RBS 20.06.06 SKAJIbnEJIb & Ko unknown esp_rbs.amx running
[ 10] 9 Subnet ban menu 0.1 Subb98 subnet_ban_ running
[ 11] 10 [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelo running
[ 14] 13 [183] Ultimate Gag 17.12.22BE SKAJIbnEJIb unknown ultimate_ga running
[ 15] 14 [190] AdminChat RBS 22.11.15 SKAJIbnEJIb unknown adminchat_r running
[ 16] 15 [190] Chat RBS 24.10.11BE SKAJIbnEJIb unknown chat_rbs.am running
[ 17] 16 [190] RestMenu RBS 24.10.11BE SKAJIbnEJIb & AM unknown restmenu_rb running
[ 18] 17 [190] Ultimate Informe 21.03.23 SKAJIbnEJIb unknown ultimate_in running
[ 19] 18 [190] Stats Configurat 24.10.11BE SKAJIbnEJIb & AM unknown statscfg_rb running
[ 20] 19 [190] StatsX RBS 24.10.11BE SKAJIbnEJIb & AM unknown statsx_rbs. running
[ 21] 20 [190] CsStats MySQL 24.10.08BE SKAJIbnEJIb unknown csstats_mys running
[ 22] 21 [190] Skill ELO 24.10.08BE SKAJIbnEJIb unknown skill_elo.a running
[ 23] 22 [190] CsStats Editor 20.06.06 SKAJIbnEJIb unknown csstats_edi running
[ 24] 23 [190] CsStats ResetSco 20.06.06 SKAJIbnEJIb unknown csstats_res running
[ 25] 24 [190] Top Award RBS 20.06.06 SKAJIbnEJIb unknown topaward_rb running
[ 26] 25 [190] BonusMenu RBS 20.06.06 SKAJIbnEJIb unknown bonusmenu_r running
[ 27] 26 [190] Army Ranks Ultim 24.10.08BE SKAJIbnEJIb unknown army_ranks_ running
[ 28] 27 [190] Stimulation RBS 24.10.10BE SKAJIbnEJIb unknown stimulation running
[ 29] 28 [190] Bets RBS 20.10.24BE SKAJIbnEJIb unknown bets_rbs.am running
[ 30] 29 [190] Ultimate Flags 22.11.15 SKAJIbnEJIb unknown ultimate_fl running
[ 31] 30 [190] Snipers RBS 20.06.06 SKAJIbnEJIb unknown snipers_rbs running
[ 32] 31 [190] VoteBan RBS 20.06.06 SKAJIbnEJIb unknown voteban_rbs running
[ 33] 32 [190] PTB RBS 20.06.06 SKAJIbnEJIb unknown ptb_rbs.amx running
[ 34] 33 [190] Warmup RBS 21.03.23 SKAJIbnEJIb unknown warmup_rbs. running
[ 35] 34 [190] Damager RBS 20.06.06 SKAJIbnEJIb unknown damager_rbs running
[ 36] 35 [190] MOTD RBS 24.10.10BE SKAJIbnEJIb unknown motd_rbs.am running
[ 37] 36 [190] C4 Destroyer 24.10.10BE SKAJIbnEJIb unknown c4_destroye running
[ 38] 37 [190] Piss RBS 24.10.10BE SKAJIbnEJIb & KR unknown piss_rbs.am running
[ 39] 38 [190] Ultimate Models 24.10.10BE SKAJIbnEJIb unknown ultimate_mo running
[ 40] 39 [190] VIP RBS 24.10.11BE SKAJIbnEJIb unknown vip_rbs.amx running
- Автор плагина
- ReHLDS Team
- Версия плагина
- 1.0
- Исходный код
-
#include <amxmodx>
#include <reapi>
const ACCESS_FLAG = ADMIN_BAN; /* тут менять флаг доступа */
public plugin_init()
{
register_plugin("[ReAPI] AdminFreeLook", "1.0", "ReHLDS Team");
if(!is_regamedll()) {
set_fail_state("ReGameDLL is not available");
return;
}
RegisterHookChain(RG_GetForceCamera, "GetForceCamera");
RegisterHookChain(RG_CBasePlayer_Observer_IsValidTarget, "Observer_IsValidTarget");
}
public GetForceCamera(const index)
{
if (!shouldRunCode())
return HC_CONTINUE;
if (canFreeLook(index)) {
SetHookChainReturn(ATYPE_INTEGER, 0);
return HC_SUPERCEDE;
}
return HC_CONTINUE;
}
public Observer_IsValidTarget(const this, const iPlayerIndex, bool:bSameTeam)
{
if (shouldRunCode())
return HC_CONTINUE;
if (!is_user_connected(iPlayerIndex))
return HC_CONTINUE;
if (iPlayerIndex == this || get_entvar(iPlayerIndex, var_iuser1) > 0 || (get_entvar(iPlayerIndex, var_effects) & EF_NODRAW) || get_member(iPlayerIndex, m_iTeam) == TEAM_UNASSIGNED)
return HC_CONTINUE;
// Don't spec observers or players who haven't picked a class yet
if (bSameTeam && get_member(iPlayerIndex, m_iTeam) != get_member(this, m_iTeam))
return HC_CONTINUE;
if (canFreeLook(iPlayerIndex)) {
SetHookChainReturn(ATYPE_INTEGER, iPlayerIndex);
return HC_SUPERCEDE;
}
return HC_CONTINUE;
}
stock bool:canFreeLook(const index) {
return bool:(get_user_flags(index) & ACCESS_FLAG);
}
stock bool:shouldRunCode()
{
return bool:(Float:get_member_game(m_flFadeToBlackValue) <= 0.0
&& Float:get_member_game(m_flForceCameraValue) > 0.0
&& Float:get_member_game(m_flForceChaseCamValue) > 0.0);
}
Плагин не работает, и я не знаю почему.
В этой теме было размещено решение! Перейти к решению.