AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   need help AddToFullPack can't get admin ent invisible[solved] (https://forums.alliedmods.net/showthread.php?t=144334)

vato loco [GE-S] 12-02-2010 10:27

need help AddToFullPack can't get admin ent invisible[solved]
 
i'm working on a semiclip update (Connors Semilip) for my plugin prokreedz ultimativ v2.4
in my old semiclip AddToFullPack work perfect

but in this one i can't get the admin ent invisible...
model are set in the way of MeRcyLeZZ TUT...
so it's importent to get the admin ent invisible
and admin ent should not not to be affected by transparecy
i have tried everything...i have no idea anymore...

plz help

here is the new AddToFullPack: -> below i will post the old one so you can see the diffrence

no idea when put this to the AddToFullPack code doen't work in the old one works
PHP Code:

        if(g_bPlayerIsAdmin[iEnt])
        {
            
set_es(es_handleES_RenderModekRenderTransTexture)
            
set_es(es_handleES_RenderAmt0)    
        } 

PHP Code:

public fw_AddToFullPack_Post(eseiEntidhostflagsplayerpSet)
{
    if(
player && id != iEnt && get_orig_retval() && is_plr_alive[id])
    {
        
set_es(esES_SolidSOLID_NOT)
        
        if(
get_pcvar_num(g_kz_transparency))   
        {    
            static 
Float:flDistance
            flDistance 
entity_range(idiEnt)
            if(
flDistance 512.0 && !g_bPlayerPaused[iEnt]) 
            {
                
set_es(esES_RenderModekRenderTransAlpha)
                
set_es(esES_RenderAmtfloatround(flDistance)/2)
            }
        }
    }
    else if(
<= id <= g_iMaxPlayers
    {
        if(!
pev_valid(iEnt))
            return 
FMRES_IGNORED
        
static owner owner pev(iEntpev_owner)
        if( (
<= owner <= g_iMaxPlayers) && (iEnt == g_iEntPlayerModel[owner] || iEnt == g_iEntWeaponModel[owner]) && id && owner && get_orig_retval() && is_plr_alive[id])
        {    
            
set_es(esES_SolidSOLID_NOT)
            
            if(
get_pcvar_num(g_kz_transparency))  
            {    
                static 
Float:flDistance
                flDistance 
entity_range(idowner)
                if(
flDistance 512.0 && !g_bPlayerPaused[owner])
                {
                    
set_es(esES_RenderModekRenderTransAlpha)
                    
set_es(esES_RenderAmtfloatround(flDistance)/2)
                }
            }
        }
    }
    return 
FMRES_IGNORED


Old AddToFullPack
PHP Code:

public fw_AddToFullPack_Post(es_handleeenthosthostflagsplayerpset
{
    if(
player
    {
        if(
g_bPlayerIsAdmin[ent])
        {
            
set_es(es_handleES_RenderModekRenderTransTexture)
            
set_es(es_handleES_RenderAmt0)    
        }
        if(
g_bSolid[host] && g_bSolid[ent]) 
        {
            if(
get_distance_f(g_fOrigin[host], g_fOrigin[ent]) <= DISTANCE)
                
set_es(es_handleES_SolidSOLID_NOT
            
            if(
get_pcvar_num(g_kz_transparency)) 
            {    
                if(
g_bPlayerIsAdmin[ent] || g_bPlayerPaused[ent])
                    return 
FMRES_IGNORED
                
                
static Float:fDistance
                fDistance 
entity_range(hostent)
                if(
fDistance 512.0)
                {
                    
set_es(es_handleES_RenderModekRenderTransAlpha)
                    
set_es(es_handleES_RenderAmtfloatround(fDistance)/2)
                }
            }
        }
    }
    else if(
<= host <= g_iMaxPlayers
    {
        if(!
pev_valid(ent))
            return 
FMRES_IGNORED
        
static owner owner pev(entpev_owner)
        if( (
<= owner <= g_iMaxPlayers) && (ent == g_iEntPlayerModel[owner] || ent == g_iEntWeaponModel[owner]) && is_plr_alive[host] && g_bSolid[host] && g_bSolid[owner]) 
        {
            if(
get_distance_f(g_fOrigin[host], g_fOrigin[owner]) <= DISTANCE)
                
set_es(es_handleES_SolidSOLID_NOT
            
            if(
get_pcvar_num(g_kz_transparency)) 
            {
                if(
g_bPlayerPaused[owner])
                    return 
FMRES_IGNORED
                
                
static Float:fDistance
                fDistance 
entity_range(hostent)
                if(
fDistance 512.0)
                {
                    
set_es(es_handleES_RenderModekRenderTransAlpha)
                    
set_es(es_handleES_RenderAmtfloatround(fDistance)/2)
                }
            }
        }
    }
    return 
FMRES_IGNORED




All times are GMT -4. The time now is 11:22.

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