- Ошибка
-
Admin Models не работает плагин, не определяется даже
- ОС
- Windows
- Билд
-
ReHLDS version: 3.0.0.411-dev
- ReGamedll
-
ReGameDLL version: 5.3.0-dev+m
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm.dll v0.1.75 ini Start Never
[ 2] Revoice RUN - revoice_mm.dll v0.1.26 ini Start Never
[ 3] AMX Mod X RUN - amxmodx_mm.dll v1.8.3-R ini Start ANY
[ 4] Rechecker RUN - rechecker_mm.dll v2.5 ini Chlvl ANY
[ 5] ReAuthCheck RUN - reauthcheck_mm.d v0.1.6 ini Start Never
[ 6] WHBlocker RUN - whblocker_mm.dll v1.5.695 ini Chlvl ANY
[ 7] ReSemiclip RUN - resemiclip_mm.dl v2.3.9 ini Chlvl ANY
[ 8] Engine RUN - engine_amxx.dll v1.8.3-R pl3 ANY ANY
[ 9] FakeMeta RUN - fakemeta_amxx.dl v1.8.3-R pl3 ANY ANY
[10] CStrike RUN - cstrike_amxx.dll v1.8.3-R pl3 ANY ANY
[11] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-R pl3 ANY ANY
[12] ReAPI RUN - reapi_amxx.dll v5.2.0.1 pl3 ANY Never
[13] ReParachute RUN - parachute_amxx.d v1.1 Bet pl3 ANY ANY
[14] ReAimDetector RUN - reaimdetector_am v0.2.0 pl3 ANY Never
[15] CSX RUN - csx_amxx.dll v1.8.3-R pl3 ANY ANY
[16] Fun RUN - fun_amxx.dll v1.8.3-R pl3 ANY ANY
- Список плагинов
-
[ 1] GameName Changer 1.0 neugomon 956_gamename_ch running
[ 2] Admin Base 1.8.3-Re AMXX Dev Team admin.amxx running
[ 3] Admin Commands 1.8.3-Re AMXX Dev Team admincmd.amxx running
[ 4] Admin Help 1.8.3-Re AMXX Dev Team adminhelp.amxx running
[ 5] Slots Reservation 1.8.3-Re AMXX Dev Team adminslots.amxx running
[ 6] Multi-Lingual System 1.8.3-Re AMXX Dev Team multilingual.am running
[ 7] Menus Front-End 1.8.3-Re AMXX Dev Team menufront.amxx running
[ 8] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx running
[ 9] Players Menu 1.8.3-Re AMXX Dev Team plmenu.amxx running
[ 10] Maps Menu 1.8.3-Re AMXX Dev Team mapsmenu.amxx running
[ 11] Plugin Menu 1.8.3-Re AMXX Dev Team pluginmenu.amxx running
[ 12] Admin Chat 1.8.3-Re AMXX Dev Team adminchat.amxx running
[ 13] Anti Flood 1.8.3-Re AMXX Dev Team antiflood.amxx running
[ 14] Scrolling Message 1.8.3-Re AMXX Dev Team scrollmsg.amxx running
[ 15] Info. Messages 1.8.3-Re AMXX Dev Team imessage.amxx running
[ 16] Admin Votes 1.8.3-Re AMXX Dev Team adminvote.amxx running
[ 17] NextMap 1.8.3-Re AMXX Dev Team nextmap.amxx running
[ 18] Nextmap Chooser 1.8.3-Re AMXX Dev Team mapchooser.amxx running
[ 19] TimeLeft 1.8.3-Re AMXX Dev Team timeleft.amxx running
[ 20] Pause Plugins 1.8.3-Re AMXX Dev Team pausecfg.amxx running
[ 21] Stats Configuration 1.8.3-Re AMXX Dev Team statscfg.amxx running
[ 22] Weapon Restrict 2.1 s1lent & neugomo weaponrest.amxx running
[ 23] StatsX 1.8.3-Re AMXX Dev Team statsx.amxx running
[ 24] unknown unknown unknown reapi_admin_mod error
[ 25] ReAimDetector API 0.2.0 ReHLDS Team reaimdetector.a running
[ 26] Afk Control 0.5.1 neygomon afk_control.amx running
[ 27] finstext 1.5 shad0wgg | legio finstext.amxx running
[ 28] [ReAPI] Random Weapons 2.4.2 neugomon random_weapons_ running
[ 29] Christmas hat 0.3 AMXX.Shop christmas_hat_r running
[ 30] Bomb Taker 0.0.1b Vaqtincha c4_taker.amxx running
[ 31] Mode 2x2 2.5re s1lent mode.amxx running
[ 32] Sky change helper 0.1 AMXX.Shop sky_change_help running
[ 33] Advanced Kill Assists 0.9 Spection next21_kill_ass running
[ 34] Block TextMsg 1.0 AcE block_textmsg.a running
[ 35] Reset Score 0.0.2f wopox1337 resetscore.amxx running
[ 36] [ReAPI] Unlimited Choo 0.0.5 Vaqtincha reapi_test_unli running
[ 37] Lite Translit 2.8 neygomon lite_translit.a running
[ 38] metori.amxx 1.0 Juice metori-dummy.am running
[ 39] Weapon Menu 1.0 Mattcook & xerob weaponmenu.amxx running
[ 40] Night VIP 0.1 F@nt0M night_vip.amxx running
[ 41] Mute 1.2 neygomon mute.amxx running
[ 42] Show Damage 1.0 neygomon damager.amxx running
[ 43] V.I.P Environment 2.1.1 Vaqtincha vip_environment running
[ 44] Block Pickup Custom We 0.0.2 Vaqtincha addon_block_pic running
[ 45] Bomb Defuse Bonuses 0.0.1 Vaqtincha addon_bomb_defu running
[ 46] Strip Weapons on Death 0.0.1 Vaqtincha addon_death_str running
[ 47] Killer Healer 0.0.2 Vaqtincha addon_killer_he running
[ 48] Killer Money 0.0.3 Vaqtincha addon_killer_mo running
[ 49] Item PWR AK47 0.0.4 Vaqtincha item_ak47.amxx running
[ 50] Item Wooden Awp 0.0.4 Vaqtincha item_awp.amxx running
[ 51] Item Golden Deagle 0.0.4 Vaqtincha item_deagle.amx running
[ 52] Prize Knife 0.1 Safety1st item_knife.amxx running
[ 53] Item PWR M4a16 0.0.4 Vaqtincha item_m4a1.amxx running
[ 54] [reAPI] Flash Control 1.1 neugomon flash_control.a running
[ 55] Easy MultiJump 1.6 twistedeuphoria/ reapi_multijump running
- Исходный код
-
// Copyright © 2016 Vaqtincha
#include <amxmodx>
#include <reapi>
enum player_models { szTTModel[64], szCTModel[64], iFlag }
/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG START ■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
#define SET_MODELINDEX
#define MAX_MODEL_PATH_LEN 128
/// FORMAT: "Terrorist Model" "Counter-Terrorist Model" "Access Flag"
new const g_eModelsData[][player_models] =
{
{ "lfadmin_t", "lfadmin_ct", ADMIN_BAN },
{ "lfvip_t", "lfvip_ct", ADMIN_LEVEL_H },
{ "lfgirl_t", "lfgirl_ct", ADMIN_CHAT },
/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG END ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
{"", "", -1} // don't touch it!!
}
#define IsValidArrayIndex(%1) (0 <= %1 <= sizeof(g_eModelsData)-1)
#if defined SET_MODELINDEX
new g_iTTModelIndex[sizeof(g_eModelsData)], g_iCTModelIndex[sizeof(g_eModelsData)]
#endif
public plugin_precache()
{
if(g_eModelsData[0][iFlag] == -1)
{
set_fail_state("Array g_eModelsData are empty!")
return
}
for(new i = 0; i < sizeof(g_eModelsData)-1; i++)
{
#if defined SET_MODELINDEX
g_iTTModelIndex[i] = precache_player_model(g_eModelsData[i][szTTModel])
g_iCTModelIndex[i] = precache_player_model(g_eModelsData[i][szCTModel])
#else
precache_player_model(g_eModelsData[i][szTTModel])
precache_player_model(g_eModelsData[i][szCTModel])
#endif
}
}
public plugin_init()
{
register_plugin("[ReAPI] Admin Models", "0.0.2", "Vaqtincha")
RegisterHookChain(RG_CBasePlayer_SetClientUserInfoModel, "SetClientUserInfoModel", .post = false)
}
public SetClientUserInfoModel(const pPlayer, infobuffer[], szNewModel[])
{
new iArrayIndex = get_user_model_by_flag(get_user_flags(pPlayer))
if(!IsValidArrayIndex(iArrayIndex))
return HC_CONTINUE
switch(get_member(pPlayer, m_iTeam))
{
case TEAM_TERRORIST: {
#if defined SET_MODELINDEX
set_member(pPlayer, m_modelIndexPlayer, g_iTTModelIndex[iArrayIndex])
#endif
SetHookChainArg(3, ATYPE_STRING, g_eModelsData[iArrayIndex][szTTModel])
}
case TEAM_CT: {
#if defined SET_MODELINDEX
set_member(pPlayer, m_modelIndexPlayer, g_iCTModelIndex[iArrayIndex])
#endif
SetHookChainArg(3, ATYPE_STRING, g_eModelsData[iArrayIndex][szCTModel])
}
default: return HC_CONTINUE
}
return HC_CONTINUE
}
get_user_model_by_flag(const iUserFlags)
{
const INVALID_INDEX = -1
for(new i = 0; i < sizeof(g_eModelsData)-1; i++)
{
if(iUserFlags & g_eModelsData[i][iFlag] || g_eModelsData[i][iFlag] == ADMIN_ALL)
return i
}
return INVALID_INDEX // non admin player
}
precache_player_model(const szModel[])
{
new szFileToPrecache[MAX_MODEL_PATH_LEN], szErrMsg[MAX_MODEL_PATH_LEN + 64]
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%s.mdl", szModel, szModel)
if(!file_exists(szFileToPrecache))
{
formatex(szErrMsg, charsmax(szErrMsg), "[Admin Models] ERROR: Model ^"%s^" not found!", szFileToPrecache)
set_fail_state(szErrMsg)
return 0
}
return precache_model(szFileToPrecache)
}
Как понятно из вышенаписанного, строка с admin models определяется как unknown
помогите решить проблему
помогите решить проблему
В этой теме было размещено решение! Перейти к решению.