Как установить Custom Player Models 0.2.4

Статус
В этой теме нельзя размещать новые ответы.

elf

Сообщения
32
Реакции
1
Ошибка
Помогите пожалуйста как установить Custom Player Models 0.2.4? В консоле выдаёт ошибки Load fails: Plugin file open error (plugin "custom_player_models_api.amxx") , Load fails: Plugin file open error (plugin "custom_player_models_cfg.amxx") , Load fails: Plugin file open error (plugin "custom_player_models_toggle.amxx") . Делал компиляцию sma файлов , компилятор выдал error. Компилятор версии 1.9.0_5263
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.529
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.13.0.788-dev-mpatch
Build date: 13:06:28 Jul 24 2023 (3390)
ReGamedll
ReGameDLL version: 5.22.0.593-dev
Версия Metamod
meta version
Metamod-r v1.3.0.131, API (5:13)
Metamod-r build: 18:51:02 Jul 11 2022
Список метамодулей
[ 1] AMX Mod X        RUN   -    amxmodx_mm_i386.so        v1.9.0.5294      ini  Start ANY  
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 3] Revoice RUN - revoice_mm_i386.so v0.1.0.34 ini Start Never
[ 4] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 5] Rechecker RUN - rechecker_mm_i386.so v2.7 ini Chlvl ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i386.so v2.4.3 ini Chlvl ANY
[ 7] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 8] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 9] Fun RUN - fun_amxx_i386.so v1.9.0.5294 pl1 ANY ANY
[10] Engine RUN - engine_amxx_i386.so v1.9.0.5294 pl1 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5294 pl1 ANY ANY
[12] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5294 pl1 ANY ANY
[13] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5294 pl1 ANY ANY
[14] CSX RUN - csx_amxx_i386.so v1.9.0.5294 pl1 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5294 pl1 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386.so v5.22.0.254-dev pl1 ANY Never
16 plugins, 16 running
Список плагинов
[  1] Admin Base              1.9.0.5294  AMXX Dev Team     admin.amxx       running  
[ 2] Admin Commands 1.9.0.5294 AMXX Dev Team admincmd.amxx running
[ 3] Slots Reservation 1.9.0.5294 AMXX Dev Team adminslots.amxx running
[ 4] Multi-Lingual System 1.9.0.5294 AMXX Dev Team multilingual.am running
[ 5] Menus Front-End 1.9.0.5294 AMXX Dev Team menufront.amxx running
[ 6] Commands Menu 1.9.0.5294 AMXX Dev Team cmdmenu.amxx running
[ 7] Players Menu 1.9.0.5294 AMXX Dev Team plmenu.amxx running
[ 8] Maps Menu 1.9.0.5294 AMXX Dev Team mapsmenu.amxx running
[ 9] Plugin Menu 1.9.0.5294 AMXX Dev Team pluginmenu.amxx running
[ 10] Admin Chat 1.9.0.5294 AMXX Dev Team adminchat.amxx running
[ 11] Anti Flood 1.9.0.5294 AMXX Dev Team antiflood.amxx running
[ 12] Scrolling Message 1.9.0.5294 AMXX Dev Team scrollmsg.amxx running
[ 13] Info. Messages 1.9.0.5294 AMXX Dev Team imessage.amxx running
[ 14] Admin Votes 1.9.0.5294 AMXX Dev Team adminvote.amxx running
[ 15] NextMap 1.9.0.5294 AMXX Dev Team nextmap.amxx running
[ 16] Nextmap Chooser 1.9.0.5294 AMXX Dev Team mapchooser.amxx running
[ 17] Pause Plugins 1.9.0.5294 AMXX Dev Team pausecfg.amxx running
[ 18] Stats Configuration 1.9.0.5294 AMXX Dev Team statscfg.amxx running
[ 19] StatsX 1.9.0.5294 AMXX Dev Team statsx.amxx running
[ 20] HookManager 3.0 LeGioN & arttty7 ultra_hook.amxx running
[ 21] Parachute 1.3 KRoT@L/JTP10181 amx_parachute.a running
[ 22] Chat Manager 1.1.2-16 Mistrick chatmanager.amx running
[ 23] unknown unknown unknown custom_player_m bad load
[ 24] unknown unknown unknown custom_player_m bad load
[ 25] unknown unknown unknown custom_player_m bad load
( 23) Load fails: Plugin file open error (plugin "custom_player_models_api.amxx")
( 24) Load fails: Plugin file open error (plugin "custom_player_models_cfg.amxx")
( 25) Load fails: Plugin file open error (plugin "custom_player_models_toggle.amxx")
25 plugins, 22 running
Автор плагина
fantom , BlackSignature
Версия плагина
Custom Player Models 0.2.4
Исходный код
#include <amxmodx>
#include <reapi>
#include "include/custom_player_models.inc"

// Steam (flag '@') support, comment if you run steam-only server
#define STEAM_SUPPORT

// Config filename in 'amxmodx/configs'
#define CONFIG_FILENAME "custom_player_models.ini"
//#define CONFIG_FILENAME "custom_player_models/models.ini"

//#define DEBUG

#define MAX_AUTHID_LENGTH 64

enum _:access_s {
ACCESS_AUTH[MAX_AUTHID_LENGTH],
ACCESS_KEY[CPM_MAX_MODEL_LENGTH]
};

new Array:g_Models = Invalid_Array, g_Size;

public plugin_init() {
register_plugin("Custom Player Models CFG", "0.2.2", "BlackSignature");

RegisterHookChain(RG_CBasePlayer_GetIntoGame, "CBasePlayer_GetIntoGame_Post", true);
RegisterHookChain(RG_CBasePlayer_SetClientUserInfoName, "CBasePlayer_SetClientUserInfoName_Post", true);

#if defined DEBUG
register_clcmd("radio2", "CmdRadio2");
register_clcmd("radio3", "CmdRadio3");
#endif
}

public custom_player_models_init() {
new path[128];
new len = get_localinfo("amxx_configsdir", path, charsmax(path));
formatex(path[len], charsmax(path) - len, "/%s", CONFIG_FILENAME);
new file = fopen(path, "rt");
if (!file) {
set_fail_state("Can't %s '%s'", file_exists(path) ? "read" : "find", path);
return;
}

g_Models = ArrayCreate(access_s);

new line[256], data[access_s], model_tt[64], body_tt[6], model_ct[64], body_ct[6], time[32];

new systime = get_systime();

while (!feof(file)) {
fgets(file, line, charsmax(line));
if (line[0] == EOS || line[0] == ';') {
continue;
}

if (parse(line,
data[ACCESS_AUTH], charsmax(data[ACCESS_AUTH]),
data[ACCESS_KEY], charsmax(data[ACCESS_KEY]),
model_tt, charsmax(model_tt),
body_tt, charsmax(body_tt),
model_ct, charsmax(model_ct),
body_ct, charsmax(body_ct),
time, charsmax(time)
) != 7) {
continue;
}

custom_player_models_register(data[ACCESS_KEY], model_tt, str_to_num(body_tt), model_ct, str_to_num(body_ct));

if(data[ACCESS_AUTH][0] == EOS) {
continue;
}

#if !defined STEAM_SUPPORT
if(data[ACCESS_AUTH][0] == '@') {
continue;
}
#endif

if(time[0] && systime >= parse_time(time, "%d.%m.%Y %H:%M")) {
continue
}

ArrayPushArray(g_Models, data);
}

fclose(file);

g_Size = ArraySize(g_Models);
}

public CBasePlayer_GetIntoGame_Post(const id) {
if(is_user_hltv(id)) {
return;
}

// for client_putinserver()
// redundant here? not sure about it
if(is_user_bot(id) && !is_entity(id)) {
RequestFrame("fix_bot", get_user_userid(id));
return;
}

set_load_player(id);
}

public CBasePlayer_SetClientUserInfoName_Post(const id, const infobuffer[], const new_name[]) {
RequestFrame("name_delay", id);
}

public name_delay(const id) {
if(is_user_alive(id) && is_entity(id)) { // is_entity() as botfix, can be redundant
set_load_player(id);
}
}

set_load_player(const id) {
new authid[MAX_AUTHID_LENGTH];
if(get_user_authid(id, authid, charsmax(authid))) {
load_player(id, authid);
}
}

public fix_bot(const userid) {
new id = find_player("k", userid);

if(id) {
load_player(id, "BOT");
}
}

load_player(id, const authid[]) {
new i, data[access_s], player_flags = get_user_flags(id);

new szName[MAX_NAME_LENGTH];
get_user_name(id, szName, charsmax(szName));

for( ; i < g_Size; i++) {
ArrayGetArray(g_Models, i, data);

switch(data[ACCESS_AUTH][0]) {
case '*': {
break;
}
#if defined STEAM_SUPPORT
case '@': {
if(is_user_steam(id)) {
break;
}
}
#endif
case 'S', 'V': {
if(strcmp(authid, data[ACCESS_AUTH], .ignorecase = true) == 0) {
break;
}
}
case '#': {
if(strcmp(szName, data[ACCESS_AUTH][1], .ignorecase = true) == 0) {
break;
}
}
default: {
if(player_flags & read_flags(data[ACCESS_AUTH])) {
break;
}
}
}
}

new szKey[CPM_MAX_MODEL_LENGTH];
new bool:bHas = custom_player_models_has(id, szKey, charsmax(szKey));

if(i != g_Size) {
if(!bHas || strcmp(szKey, data[ACCESS_KEY], .ignorecase = false) != 0) {
custom_player_models_set(id, data[ACCESS_KEY]);
}
} else if(bHas) {
custom_player_models_reset(id);
}
}

public plugin_end() {
if(g_Models != Invalid_Array) {
ArrayDestroy(g_Models);
}
}

#if defined DEBUG
public CmdRadio2(const id) {
if (custom_player_models_is_enable(id)) {
client_print_color(id, print_team_grey, "^4Models ^3disabled");
custom_player_models_enable(id, false);
} else {
client_print_color(id, print_team_blue, "^4Models ^3enabled");
custom_player_models_enable(id, true);
}
return PLUGIN_HANDLED;
}

public CmdRadio3(const id) {
new player;
get_user_aiming(id, player);
if (!is_user_connected(player)) {
client_print_color(id, print_team_red, "^3Player not found");
return PLUGIN_HANDLED;
}

if (custom_player_models_has(player)) {
client_print_color(id, print_team_grey, "^4Model ^3reseted");
custom_player_models_reset(player);
} else {
new data[access_s];
ArrayGetArray(g_Models, random_num(0, g_Size - 1), data);
custom_player_models_set(player, data[ACCESS_KEY]);
client_print_color(id, print_team_blue, "^4Model ^3setted ^4[%s]", data[ACCESS_KEY]);
}
return PLUGIN_HANDLED;
}
#endif

#include <amxmodx>
#include <nvault>
#include <time>
#include "include/custom_player_models.inc"

#define MAX_AUTHID_LENGTH 64

new const CLCMDS[][] = {
"say /models",
"say_team /models"
};

#define DEFAULT_STATE true

#define ANTISPAM_DELAY 1.0

#define PRUNE_DAYS 30

#define VAULT_NAME "custom_player_models"

new g_Vault = INVALID_HANDLE;

public plugin_init() {
register_plugin("Custom Player Models Toggle", "0.2.1", "BlackSignature");
register_dictionary("cpm_toggle.txt");

for(new i; i < sizeof(CLCMDS); i++) {
register_clcmd(CLCMDS[i], "ClCmd_Toggle");
}
}

public plugin_cfg() {
g_Vault = nvault_open(VAULT_NAME);

if(g_Vault != INVALID_HANDLE) {
nvault_prune(g_Vault, 0, get_systime() - (PRUNE_DAYS * SECONDS_IN_DAY));
}
}

public client_authorized(id, const authid[]) {
if(is_user_connected(id)) {
load_player(id, authid);
}
}

public client_putinserver(id) {
new authid[MAX_AUTHID_LENGTH];

if(get_user_authid(id, authid, charsmax(authid))) {
load_player(id, authid);
}
}

load_player(id, const authid[]) {
if (is_user_bot(id) || is_user_hltv(id)) {
return;
}
if(g_Vault != INVALID_HANDLE && nvault_get(g_Vault, authid)) {
custom_player_models_enable(id, !DEFAULT_STATE);
nvault_touch(g_Vault, authid);
} else {
custom_player_models_enable(id, DEFAULT_STATE);
}
}

public ClCmd_Toggle(id) {
static Float:fNextTime[MAX_PLAYERS + 1]

new Float:fGameTime = get_gametime();

if(fNextTime[id] > fGameTime) {
return PLUGIN_HANDLED;
}

fNextTime[id] = fGameTime + ANTISPAM_DELAY;

new bool:bEnabled = custom_player_models_is_enable(id);
custom_player_models_enable(id, !bEnabled);

client_print_color(id, print_team_red, "%L", id, bEnabled ? "CPM__TOGGLE_OFF" : "CPM__TOGGLE_ON");

if(g_Vault == INVALID_HANDLE) {
return PLUGIN_HANDLED;
}

new authid[MAX_AUTHID_LENGTH];
get_user_authid(id, authid, charsmax(authid));

if(bEnabled) {
nvault_set(g_Vault, authid, "1");
} else {
nvault_remove(g_Vault, authid);
}

return PLUGIN_HANDLED;
}

public plugin_end() {
if(g_Vault != INVALID_HANDLE) {
nvault_close(g_Vault);
}
}

#include <amxmodx>
#include <fakemeta>
#include <reapi>
#include "include/custom_player_models.inc"

// Support submodels (body). Comment to disable and save some CPU.
#define SUPPORT_BODY

#define CHECK_NATIVE_ARGS_NUM(%1,%2,%3) \
if (%1 < %2) { \
log_error(AMX_ERR_NATIVE, "Invalid num of arguments %d. Expected %d", %1, %2); \
return %3; \
}

#define CHECK_NATIVE_PLAYER(%1,%2) \
if (!is_user_connected(%1)) { \
log_error(AMX_ERR_NATIVE, "Invalid player %d", %1); \
return %2; \
}

enum _:model_s {
MODEL_INDEX_TT,
MODEL_TT[CPM_MAX_MODEL_LENGTH],
MODEL_BODY_TT,
MODEL_INDEX_CT,
MODEL_CT[CPM_MAX_MODEL_LENGTH],
MODEL_BODY_CT
};

enum _:player_s {
bool:PLAYER_HAS_MODEL,
bool:PLAYER_SEE_MODEL,
PLAYER_MODEL_KEY[CPM_MAX_KEY_LENGTH],
PLAYER_MODEL[model_s],
}

new Trie:Models = Invalid_Trie, Model[model_s];
new Players[MAX_PLAYERS + 1][player_s];

new Receiver;

public plugin_natives() {
register_native("custom_player_models_register", "NativeRegister");
register_native("custom_player_models_has", "NativeHas");
register_native("custom_player_models_set", "NativeSet");
register_native("custom_player_models_set_body", "NativeSetBody");
register_native("custom_player_models_get_body", "NativeGetBody");
register_native("custom_player_models_reset", "NativeReset");
register_native("custom_player_models_enable", "NativeEnable");
register_native("custom_player_models_is_enable", "NativeIsEnable");
}

public plugin_precache() {
register_plugin("Custom Player Models API", "0.2.4", "F@nt0M & BlackSignature");

new ret, fwd = CreateMultiForward("custom_player_models_init", ET_IGNORE);
ExecuteForward(fwd, ret);
DestroyForward(fwd);
}

public plugin_init() {
if (Models != Invalid_Trie) {
RegisterHookChain(RH_SV_WriteFullClientUpdate, "SV_WriteFullClientUpdate_Pre", false);
register_forward(FM_AddToFullPack, "AddToFullPack_Post", true);

if(find_plugin_byfile("rt_core.amxx", .ignoreCase = 0) == INVALID_PLUGIN_ID) {
register_message(get_user_msgid("ClCorpse"), "MsgHookClCorpse")
}
else {
log_amx("Plugin 'Revive Teammates' detected, ClCorpse message will not be registered!")
}
}
}

public plugin_end() {
if (Models != Invalid_Trie) {
TrieDestroy(Models);
}
}

public client_connect(id) {
clearPlayer(id);
}

public client_disconnected(id) {
clearPlayer(id);
}

public SV_WriteFullClientUpdate_Pre(const client, const buffer, const receiver) {
if(Receiver && receiver != Receiver) {
return HC_SUPERCEDE;
}

if (Players[receiver][PLAYER_SEE_MODEL] && is_user_connected(client) && Players[client][PLAYER_HAS_MODEL]) {
set_key_value(buffer, "model", "");
}

return HC_CONTINUE;
}

public AddToFullPack_Post(const handle, const e, const ent, const host, const hostflags, const player, const pSet) {
if (!player || !Players[ent][PLAYER_HAS_MODEL] || !Players[host][PLAYER_SEE_MODEL] || !get_orig_retval()) {
return;
}

switch (get_member(ent, m_iTeam)) {
case TEAM_TERRORIST: {
set_es(handle, ES_ModelIndex, Players[ent][PLAYER_MODEL][MODEL_INDEX_TT]);
#if defined SUPPORT_BODY
set_es(handle, ES_Body, Players[ent][PLAYER_MODEL][MODEL_BODY_TT]);
#endif
}

case TEAM_CT: {
set_es(handle, ES_ModelIndex, Players[ent][PLAYER_MODEL][MODEL_INDEX_CT]);
#if defined SUPPORT_BODY
set_es(handle, ES_Body, Players[ent][PLAYER_MODEL][MODEL_BODY_CT]);
#endif
}
}
}

public MsgHookClCorpse() {
enum {
arg_model = 1,
arg_origin_x,
arg_origin_y,
arg_origin_z,
arg_angles_x,
arg_angles_y,
arg_angles_z,
arg_delay,
arg_sequence,
arg_body,
arg_team,
arg_player,
};

new player = get_msg_arg_int(arg_player);
if (!Players[player][PLAYER_HAS_MODEL]) {
return PLUGIN_CONTINUE;
}

new team = get_msg_arg_int(arg_team);

new key;

#if defined SUPPORT_BODY
new custom_body;
#endif

switch (team) {
case TEAM_TERRORIST: {
key = MODEL_TT;
#if defined SUPPORT_BODY
custom_body = Players[player][PLAYER_MODEL][MODEL_BODY_TT];
#endif
}

case TEAM_CT: {
key = MODEL_CT;
#if defined SUPPORT_BODY
custom_body = Players[player][PLAYER_MODEL][MODEL_BODY_CT];
#endif
}

default: {
return PLUGIN_CONTINUE;
}
}

new model[CPM_MAX_MODEL_LENGTH], origin[3], Float:angles[3];
get_msg_arg_string(arg_model, model, charsmax(model));

origin[0] = get_msg_arg_int(arg_origin_x);
origin[1] = get_msg_arg_int(arg_origin_y);
origin[2] = get_msg_arg_int(arg_origin_z);

angles[0] = get_msg_arg_float(arg_angles_x);
angles[1] = get_msg_arg_float(arg_angles_y);
angles[2] = get_msg_arg_float(arg_angles_z);

new delay = get_msg_arg_int(arg_delay);
new sequence = get_msg_arg_int(arg_sequence);

new default_body = get_msg_arg_int(arg_body);

static msgClCorpse;

if(!msgClCorpse) {
msgClCorpse = get_user_msgid("ClCorpse");
}

for (new id = 1; id <= MaxClients; id++) {
if (!is_user_connected(id)) {
continue;
}

message_begin(MSG_ONE, msgClCorpse, .player = id);
if (Players[id][PLAYER_SEE_MODEL]) {
write_string(Players[player][PLAYER_MODEL][key]);
} else {
write_string(model);
}
write_long(origin[0]);
write_long(origin[1]);
write_long(origin[2]);
write_coord_f(angles[0]);
write_coord_f(angles[1]);
write_coord_f(angles[2]);
write_long(delay);
write_byte(sequence);
#if defined SUPPORT_BODY
if (Players[id][PLAYER_SEE_MODEL]) {
write_byte(custom_body);
} else {
write_byte(default_body);
}
#else
write_byte(default_body);
#endif
write_byte(team);
write_byte(player);
message_end();
}

return PLUGIN_HANDLED;
}

public bool:NativeRegister(const plugin, const argc) {
enum { arg_key = 1, arg_model_tt, arg_body_tt, arg_model_ct, arg_body_ct };
CHECK_NATIVE_ARGS_NUM(argc, arg_body_ct, false)

new key[CPM_MAX_KEY_LENGTH];
get_string(arg_key, key, charsmax(key));

if (Models != Invalid_Trie && TrieKeyExists(Models, key)) {
return true;
}

new model[CPM_MAX_MODEL_LENGTH];
get_string(arg_model_tt, model, charsmax(model));

if (!loadModel(model, MODEL_INDEX_TT, MODEL_TT)) {
log_error(AMX_ERR_NATIVE, "Error precache %s", model);
return false;
}

get_string(arg_model_ct, model, charsmax(model));

if (!loadModel(model, MODEL_INDEX_CT, MODEL_CT)) {
log_error(AMX_ERR_NATIVE, "Error precache %s", model);
return false;
}

if (Models == Invalid_Trie) {
Models = TrieCreate();
}

Model[MODEL_BODY_TT] = get_param(arg_body_tt);
Model[MODEL_BODY_CT] = get_param(arg_body_ct);

TrieSetArray(Models, key, Model, sizeof Model);
return true;
}

public bool:NativeHas(const plugin, const argc) {
enum { arg_player = 1, arg_key, arg_length };
CHECK_NATIVE_ARGS_NUM(argc, arg_length, false)

new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)

if (!Players[player][PLAYER_HAS_MODEL]) {
return false;
}

set_string(arg_key, Players[player][PLAYER_MODEL_KEY], get_param(arg_length));
return true;
}

public bool:NativeSet(const plugin, const argc) {
enum { arg_player = 1, arg_key };
CHECK_NATIVE_ARGS_NUM(argc, arg_key, false)

new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)

new key[CPM_MAX_KEY_LENGTH];
get_string(arg_key, key, charsmax(key));
if (!TrieGetArray(Models, key, Model, sizeof Model)) {
log_error(AMX_ERR_NATIVE, "Invalid key %s", key);
return false;
}

Players[player][PLAYER_HAS_MODEL] = true;
copy(Players[player][PLAYER_MODEL_KEY], CPM_MAX_KEY_LENGTH - 1, key);
Players[player][PLAYER_MODEL] = Model;
rh_update_user_info(player);
return true;
}

public bool:NativeSetBody(const plugin, const argc) {
enum { arg_player = 1, arg_team, arg_body };
CHECK_NATIVE_ARGS_NUM(argc, arg_body, false)

new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)

new any:iTeam = get_param(arg_team);

if( !(TEAM_SPECTATOR > iTeam > TEAM_UNASSIGNED) ) {
log_error(AMX_ERR_NATIVE, "Invalid team %d", iTeam);
return false;
}

new body = get_param(arg_body);

new iSetTo = (iTeam == TEAM_TERRORIST) ? MODEL_BODY_TT : MODEL_BODY_CT;

Players[player][PLAYER_MODEL][iSetTo] = body;
return true;
}

public bool:NativeGetBody(const plugin, const argc) {
enum { arg_player = 1, arg_team, arg_body };
CHECK_NATIVE_ARGS_NUM(argc, arg_body, false)

new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)

new any:iTeam = get_param(arg_team);

if( !(TEAM_SPECTATOR > iTeam > TEAM_UNASSIGNED) ) {
log_error(AMX_ERR_NATIVE, "Invalid team %d", iTeam);
return false;
}

if(!Players[player][PLAYER_HAS_MODEL]) {
return false;
}

new iGetFrom = (iTeam == TEAM_TERRORIST) ? MODEL_BODY_TT : MODEL_BODY_CT;

set_param_byref(arg_body, Players[player][PLAYER_MODEL][iGetFrom]);

return true;
}

public bool:NativeReset(const plugin, const argc) {
enum { arg_player = 1 };
CHECK_NATIVE_ARGS_NUM(argc, arg_player, false)

new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)

Players[player][PLAYER_HAS_MODEL] = false;
rh_update_user_info(player);
return true;
}

public bool:NativeEnable(const plugin, const argc) {
enum { arg_player = 1, arg_value };
CHECK_NATIVE_ARGS_NUM(argc, arg_value, false)

new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)

Players[player][PLAYER_SEE_MODEL] = bool:get_param(arg_value);

Receiver = player;

for (new id = 1; id <= MaxClients; id++) {
if (is_user_connected(id) && Players[id][PLAYER_HAS_MODEL] && is_entity(id)) { // is_entity() as botfix
rh_update_user_info(id);
}
}

Receiver = 0;

return true;
}

public bool:NativeIsEnable(const plugin, const argc) {
enum { arg_player = 1 };
CHECK_NATIVE_ARGS_NUM(argc, arg_player, false)

new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)

return Players[player][PLAYER_SEE_MODEL];
}

bool:loadModel(const model[], const key_index, const key_model) {
if (!file_exists(model, true)) {
return false;
}
Model[key_index] = precache_model(model);
copy(Model[key_model], CPM_MAX_MODEL_LENGTH - 1, model);
return true;
}

clearPlayer(const id) {
Players[id][PLAYER_HAS_MODEL] = false;
Players[id][PLAYER_SEE_MODEL] = true;
arrayset(Players[id][PLAYER_MODEL_KEY], 0, CPM_MAX_KEY_LENGTH - 1);
}

// https://github.com/ufame/ReviveTeammates --->

/**
* Called after the creation of the corpse is completed
*
* @param iEnt corpse entity index
* @param id id of the player whose corpse
* @param vOrigin coordinates of the corpse
*
*/
public rt_creating_corpse_end(const iEnt, const id, const vOrigin[3]) {
if(!Players[id][PLAYER_HAS_MODEL] || !is_entity(iEnt)) {
return;
}

switch (get_member(id, m_iTeam)) {
case TEAM_TERRORIST: {
engfunc(EngFunc_SetModel, iEnt, Players[id][PLAYER_MODEL][MODEL_TT]);
#if defined SUPPORT_BODY
set_entvar(iEnt, var_body, Players[id][PLAYER_MODEL][MODEL_BODY_TT]);
#endif
}

case TEAM_CT: {
engfunc(EngFunc_SetModel, iEnt, Players[id][PLAYER_MODEL][MODEL_CT]);
#if defined SUPPORT_BODY
set_entvar(iEnt, var_body, Players[id][PLAYER_MODEL][MODEL_BODY_CT]);
#endif
}
}
}
Помогите пожалуйста как установить Custom Player Models 0.2.4? В консоле выдаёт ошибки Load fails: Plugin file open error (plugin "custom_player_models_api.amxx") , Load fails: Plugin file open error (plugin "custom_player_models_cfg.amxx") , Load fails: Plugin file open error (plugin "custom_player_models_toggle.amxx") . Делал компиляцию sma файлов , компилятор выдал error. Компилятор версии 1.9.0_5263
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
372
Реакции
47
Помог
6 раз(а)
Не все составляющие установил
 
Сообщения
3,047
Реакции
1,739
Помог
80 раз(а)
это как спросить у врача, что у меня болит?
врач должен догадаться...
 
Сообщения
206
Реакции
21
Помог
6 раз(а)
elf,
Код:
( 23) Load fails: Plugin file open error (plugin "custom_player_models_api.amxx")
( 24) Load fails: Plugin file open error (plugin "custom_player_models_cfg.amxx")
( 25) Load fails: Plugin file open error (plugin "custom_player_models_toggle.amxx")
Эти плагины необходимы и не существуют по этому пути, Проверь это. cstrike\addons\amxmodx\plugins
 
Статус
В этой теме нельзя размещать новые ответы.

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

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