AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Remove transparency? (https://forums.alliedmods.net/showthread.php?t=326423)

fysiks 08-01-2020 02:28

Re: Remove transparency?
 
Quote:

Originally Posted by Stefanos (Post 2712497)
i dont want to spam in threads.. easier is like this

... he said while spamming posts in this thread

DJEarthQuake 08-01-2020 08:39

Re: Remove transparency?
 
Quote:

Originally Posted by Stefanos (Post 2712403)
or even better, transparency works for team, but for non team does not work ?

Is that still the thread objective?

Cirovic 08-01-2020 10:14

Re: Remove transparency?
 
yes it would be good if u can make that

DJEarthQuake 08-01-2020 14:17

Re: Remove transparency?
 
Code:
    new SzTeam[4], Players_team, Your_team;     Players_team = get_user_team(iEnt, SzTeam, charsmax(SzTeam));     Your_team = get_user_team(id, SzTeam, charsmax(SzTeam));     if( player && id != iEnt && get_orig_retval() && is_user_alive(id) && Players_team == Your_team )

Toning the distance down to 50.0 also is more 'balanced' otherwise people can walk close together and be invisible.

Cirovic 08-01-2020 15:22

Re: Remove transparency?
 
so what should i do with that

DJEarthQuake 08-01-2020 16:16

Re: Remove transparency?
 
Replace this line with the snip.
Code:

if( player && id != iEnt && get_orig_retval() && is_user_alive(id) )
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> #include <hamsandwich> #define NotDeadorHLTV "ah" const MAX_PLAYERS = 32 new g_iPlayers[MAX_PLAYERS], g_iNum, g_iPlayer, g_iSemiclip, i; new SzTeam[4], Players_team, Your_team; static Float:flDistance public plugin_init() {     register_plugin("Semiclip", "1.1", "ConnorMcLeod|SPiNX")     g_iSemiclip = register_cvar("sv_semiclip", "1");     register_forward(FM_AddToFullPack, "FM_client_AddToFullPack_Post", 1)     RegisterHam(Ham_Player_PreThink, "player", "Ham_CBasePlayer_PreThink_Post", 1) } public FM_client_AddToFullPack_Post(es, e, iEnt, id, hostflags, player, pSet) {     Players_team = get_user_team(iEnt, SzTeam, charsmax(SzTeam));     Your_team = get_user_team(id, SzTeam, charsmax(SzTeam));     if( player && id != iEnt && get_orig_retval() && is_user_alive(id) && Players_team == Your_team )     {         flDistance = entity_range(id, iEnt)         if( flDistance < 50.0 )         {             set_es(es, ES_RenderMode, kRenderTransAlpha)             set_es(es, ES_RenderAmt, floatround(flDistance)/2)         }     } } public Ham_CBasePlayer_PreThink_Post(id) {     if(!is_user_alive(id) || get_pcvar_num(g_iSemiclip) == 0)     {         return     }     if( is_user_bot(id) && is_user_connected(id) || !is_user_bot(id) && is_user_connected(id) ){     //'Some' bots are knife proof otherwise.     get_players(g_iPlayers, g_iNum, NotDeadorHLTV)     for(i = 0; i<g_iNum; i++)     {         g_iPlayer = g_iPlayers[i]         Players_team = get_user_team(g_iPlayer, SzTeam, charsmax(SzTeam));         Your_team = get_user_team(id, SzTeam, charsmax(SzTeam));         if( id != g_iPlayer && Your_team == Players_team  )         {             set_pev(g_iPlayer, pev_solid, SOLID_NOT)         }       }    } } public client_PostThink(id) {     if( !is_user_connected(id) )     {         return     }     get_players(g_iPlayers, g_iNum, NotDeadorHLTV)     for(i = 0; i<g_iNum; i++)     {         g_iPlayer = g_iPlayers[i]         if( g_iPlayer != id )         {             set_pev(g_iPlayer, pev_solid, SOLID_SLIDEBOX)         }     } }


All times are GMT -4. The time now is 17:13.

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