Greetings,
Just here to inquire about a little problem I've been facing with Server Models.
I'm running a reHLDS Deathrun Server with reAMXModX 1.8.3.
I've been wanting to have custom model for Admins specifically with ADMIN_SLAY access and here I found
this little plugin that does just what I want.
Now the case is, for some reason, I'm facing the exact same problem is this guy in
this thread.
Model downloads successfully, but somehow just doesn't show up on a player. All players are just with the standard HL-Models. I tried opening the specific model I was trynna install in jed's model viewer and it did load successfully.
Here's my edit in the above mentioned plugin :
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("AMX Admin Model", "1.1.1", "whitemike")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/banan/banana.mdl")
precache_model("models/player/banan/banana.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_SLAY) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "banana")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "banana")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}
You can
download banana.mdl here securely to verify if there's any problem with scaling (if that even matters.)
Checked plugins.ini just to see if any other plugins blocks or replaces the custom model, but no sources looked suspicious enough,
also verified that it USED to work before, it just stopped suddenly 2 days ago after a mapchange
Tried other code(not mine) to get the thing to actually execute inside the server :
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#define PLUGIN_NAME "model_adm"
#define PLUGIN_AUTHOR "Forze"
#define PLUGIN_VERSION "0.1"
#define ADM ADMIN_SLAY
new cvar_model
public plugin_init(){
register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1);
cvar_model = register_cvar("adm_model_enable", "1")
}
public plugin_precache(){
precache_model("models/player/banan/banana.mdl")
return PLUGIN_CONTINUE
}
public fwHamPlayerSpawnPost(id){
if(!get_pcvar_num(cvar_model))
{
if(get_user_flags(id) & ADM)
{
cs_reset_user_model(id)
}
}
else
{
if(get_user_flags(id) & ADM)
{
cs_set_user_model(id, "banana")
}
}
}
At the end of the day, whatever code I've tried to put in, has the exact same behaviour of not making the models visible in the server but does download the model to all clients/connections.
Here's my server.cfg :
PHP Code:
deleted by self
Tried putting the .amxx on top of the plugins.ini to completely prioritize the models execution over any other, returning with no luck.
So, I'm out here trying to find some luck, and just kinda come up with something for this small problem.
Hope the details provided were enough to analyze the problem.
Thanks for considering this post.
Kindest Regards,
ZEDD
__________________