I've searched but didn't find.
I need to make player invisible to put model on it. (from biohazard)
PHP Code:
stock check_user_model(index, human, v_user){
set_pev(index, pev_renderamt, 0.0)
set_pev(index, pev_rendermode, kRenderTransAlpha) // this makes weapons invisible, if i put kRenderNone then weapons are visible but and the default player model is visible and there are 2 different models (custom and default one) seen on players , it looks very ugly
if(!pev_valid(g_modelent[index]))
{
static ent
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
if(pev_valid(ent))
{
if(v_user)
engfunc(EngFunc_SetModel, ent, human ? VIP_HUMAN : VIP_ZM)
else if(human)
engfunc(EngFunc_SetModel, ent, MNX_HUMAN)
set_pev(ent, pev_classname, MODEL_CLASSNAME)
set_pev(ent, pev_movetype, MOVETYPE_FOLLOW)
set_pev(ent, pev_aiment, index)
set_pev(ent, pev_owner, index)
g_modelent[index] = ent
}
}
else
{
if(v_user)
engfunc(EngFunc_SetModel, g_modelent[index], human ? VIP_HUMAN : VIP_ZM)
else if(human)
engfunc(EngFunc_SetModel, g_modelent[index], MNX_HUMAN)
fm_set_entity_visibility(g_modelent[index], 1)
}
}
//the stock
stock fm_set_entity_visibility(index, visible = 1)
set_pev(index, pev_effects, visible == 1 ? pev(index, pev_effects) & ~EF_NODRAW : pev(index, pev_effects) | EF_NODRAW)
The problem is default biohazard doesnt have custom model for humans (cts) and after i added it works but weapon is not visible. I don't know how to do, i tried to do with glow but when it makes weapon visible the default model is visible and there are 2 models on player its very ugly.
Can i make player invisible but weapon remain visible.(with fakemeta only (set_pev))
P.S. I tried to use set_pev(id, pev_viewmodel, 1) to make weapons visible but it crashes the server.