AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP][PLZ] fw_AddToFullPack Problem (https://forums.alliedmods.net/showthread.php?t=126258)

vato loco [GE-S] 05-07-2010 13:43

[solved] fw_AddToFullPack Problem
 
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 :wink:


PHP Code:

public fw_AddToFullPack_Post(es_handleeenthosthostflagsplayerpset
{
    if(!
g_bSemiclipEnabled)
    {
        return 
FMRES_IGNORED
    
}
    if(
player
    {
        if(
host != ent && get_orig_retval() && is_plr_alive[host]) 
        {
            
set_es(es_handleES_SolidSOLID_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(hostent)
                    if( 
flDistance 512.0 )
                    {
                        
set_es(es_handleES_RenderModekRenderTransAlpha)
                        
set_es(es_handleES_RenderAmtfloatround(flDistance)/2)
                    }
                }
            }
        }
// makin admin ent invisible permanent
        
if(g_bPlayerIsAdmin[ent]) 
        {
            
set_es(es_handleES_RenderModekRenderTransTexture)
            
set_es(es_handleES_RenderAmt0)
        }
    }
    else if(
<= host <= g_iMaxPlayers
    {
        if(!
pev_valid(ent) || get_pcvar_num(g_kz_custom_models))
            return 
FMRES_SUPERCEDE
        
static owner owner pev(entpev_owner)
        if( (
<= owner <= g_iMaxPlayers) && (ent == g_iEntPlayerModel[owner] || ent == g_iEntWeaponModel[owner]) && is_plr_alive[host] && host && owner && get_orig_retval()) 
        {
            
set_es(es_handleES_SolidSOLID_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(hostent)
                    if( 
flDistance 512.0 )
                    {
                        
set_es(es_handleES_RenderModekRenderTransAlpha)
                        
set_es(es_handleES_RenderAmtfloatround(flDistance)/2)
                    }
                }
            }
        }
    }
    return 
FMRES_IGNORED



meTaLiCroSS 05-07-2010 17:21

Re: [HELP][PLZ] fw_AddToFullPack Problem
 
PHP Code:

    if(!g_bSemiclipEnabled)
    {
        return 
FMRES_SUPERCEDE
    


You know what you are doing with that little code?

vato loco [GE-S] 05-07-2010 19:25

Re: [HELP][PLZ] fw_AddToFullPack Problem
 
better now !? :mrgreen:
PHP Code:

    if(!g_bSemiclipEnabled)
    {
        return 
FMRES_IGNORED
    




All times are GMT -4. The time now is 03:54.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.