AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Respwn Protect JCTF (https://forums.alliedmods.net/showthread.php?t=338099)

yagami 06-06-2022 15:09

Respwn Protect JCTF
 
Hi so I'm trying to apply a transparent color for the jctf respawn but I can't apply it at all, I wanted the same transparent white regame if it's not possible I just wanted to change the color of the protection to white could someone help me?

PHP Code:

player_updateRender(idFloat:fDamage 0.0)
{
    
// Vars
    
new bool:bGlows = (get_pcvar_num(pCvar_ctf_glows) == 1)
    new 
iTeam get_user_team(id)
    new 
iMode kRenderNormal
    
new iEffect kRenderFxNone
    
new iColor[3] = {0,0,0}

    
// Protected
    
if(g_bProtected[id])
    {
        
iEffect kRenderFxHologram;

        
// Collor
        
iColor[0] = (iTeam == TEAM_RED 155 0)
        
iColor[1] = (fDamage 0.0 100 clamp(floatround(fDamage), 0100) : 0)
        
iColor[2] = (iTeam == TEAM_BLUE 155 0)
    }

// FEATURE_ADRENALINE == true
#if FEATURE_ADRENALINE == true
    
switch(g_iAdrenalineUse[id])
    {
        case 
ADRENALINE_BERSERK:
        {
            
// Glows
            
if(bGlowsiEffect kRenderFxGlowShell

            
// Collor
            
iColor = {55055}
        }
        case 
ADRENALINE_INVISIBILITY:
        {
            
iMode kRenderTransAlpha

            
// Glows
            
if(bGlowsiEffect kRenderFxGlowShell        

            
// Collor        
            
iColor = {151515}
        }
    }
#endif
    
/if(player_hasFlag(id))
    {
        
// Type
        
if(iMode != kRenderTransAlphaiMode kRenderNormal;
        if(
bGlowsiEffect kRenderFxGlowShell

        
// Color
        
iColor[0] = (iTeam == TEAM_RED ? (iColor[0] > 200 155) : 0)
        
iColor[1] = (iAmount == 160 55 0)
        
iColor[2] = (iTeam == TEAM_BLUE ? (iColor[2] > 200 155) : 0)
    }*/

    
// Render
    
fm_set_rendering(idiEffect0iColor[1], 0iMode10)



mlibre 07-15-2022 11:14

Re: Respwn Protect JCTF
 
try this... "untested"

PHP Code:

    // Protected
    
if(g_bProtected[id])
    {
        
iEffect kRenderFxHologram;

        
// Collor
/*
        iColor[0] = (iTeam == TEAM_RED ? 155 : 0)
        iColor[1] = (fDamage > 0.0 ? 100 - clamp(floatround(fDamage), 0, 100) : 0)
        iColor[2] = (iTeam == TEAM_BLUE ? 155 : 0)
*/
        
iColor = {255255255}

    } 



All times are GMT -4. The time now is 21:19.

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