hi everyone,
i have a little problem with AddToFullPack...i'm still getting confused with it!
i have searched the hole forum for treads that maybe can help but
without success!
this AddToFullPack i'm using for the kz semiclip.
my problem is:
i don't want that the Admin[id] and the the Paused[id]
be effected by the tranparency.
Admin[id] should be always invisible reason:
i'm setting modles with MeRcyLeZZ way for admins but this part works !!
Paused[id] when true should not be effected by transparency
because i want to set a diffrent rendering on paused players
with out AddToFullPack usual set_rendering
when player Paused[id] false
tranparecy should work normal !!!
thx inadvance vato
PHP Code:
public fw_AddToFullPack_Post(es_handle, e, ent, host, hostflags, player, pset)
{
if(!g_bSemiclipEnabled)
{
return FMRES_IGNORED
}
if(player)
{
if(host != ent && get_orig_retval() && is_plr_alive[host])
{
set_es(es_handle, ES_Solid, SOLID_NOT)
if(get_pcvar_num(g_kz_transparency))
{
if(!g_bPlayerIsAdmin[ent] || !g_bPlayerPaused[ent]) // <- this part seems not work
{
static Float:flDistance
flDistance = fm_entity_range(host, ent)
if( flDistance < 512.0 )
{
set_es(es_handle, ES_RenderMode, kRenderTransAlpha)
set_es(es_handle, ES_RenderAmt, floatround(flDistance)/2)
}
}
}
}// makin admin ent invisible permanent
if(g_bPlayerIsAdmin[ent])
{
set_es(es_handle, ES_RenderMode, kRenderTransTexture)
set_es(es_handle, ES_RenderAmt, 0)
}
}
else if(1 <= host <= g_iMaxPlayers)
{
if(!pev_valid(ent) || get_pcvar_num(g_kz_custom_models))
return FMRES_SUPERCEDE
static owner ; owner = pev(ent, pev_owner)
if( (1 <= owner <= g_iMaxPlayers) && (ent == g_iEntPlayerModel[owner] || ent == g_iEntWeaponModel[owner]) && is_plr_alive[host] && host && owner && get_orig_retval())
{
set_es(es_handle, ES_Solid, SOLID_NOT)
if(get_pcvar_num(g_kz_transparency))
{
if(!g_bPlayerPaused[owner])// not sure if this is correct but works
{
static Float:flDistance
flDistance = fm_entity_range(host, ent)
if( flDistance < 512.0 )
{
set_es(es_handle, ES_RenderMode, kRenderTransAlpha)
set_es(es_handle, ES_RenderAmt, floatround(flDistance)/2)
}
}
}
}
}
return FMRES_IGNORED
}
__________________