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)

Stefanos 07-30-2020 14:51

Remove transparency?
 
can transparency be removed from this semiclip :) ?

https://forums.alliedmods.net/showth...02#post1020602

Stefanos 07-30-2020 14:51

Re: Remove transparency?
 
or even better, transparency works for team, but for non team does not work ?

OciXCrom 07-30-2020 16:38

Re: Remove transparency?
 
Remove this:

Code:

static*Float:flDistance
********flDistance*=*entity_range(id,*iEnt)
********if(*flDistance*<*512.0*)
********{
************set_es(es,*ES_RenderMode,*kRenderTransAlpha)
************set_es(es,*ES_RenderAmt,*floatround(flDistance)/2)
********}


Stefanos 07-30-2020 23:30

Re: Remove transparency?
 
semiclip.sma(8) : error 020: invalid symbol name ""

when i tried to compile

fysiks 07-30-2020 23:56

Re: Remove transparency?
 
Attach the new file and we can help resolve the issue.

Stefanos 07-31-2020 08:03

Re: Remove transparency?
 
that is the smae file that i gave link.

OciXCrom 07-31-2020 08:16

Re: Remove transparency?
 
The file compiles just fine, so post your code after you made the changes.

Moody92 07-31-2020 08:18

Re: Remove transparency?
 
PHP Code:

#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>

new const VERSION[] = "0.7.0"

const MAX_PLAYERS 32

new g_iPlayers[MAX_PLAYERS], g_iNumg_iPlayeri
new const g_szAliveFlags[] = "a"
#define RefreshPlayersList()    get_players(g_iPlayers, g_iNum, g_szAliveFlags)

public plugin_init()
{
    
register_plugin("Semiclip"VERSION"ConnorMcLeod")

    
register_forward(FM_AddToFullPack"FM_client_AddToFullPack_Post"1)

    
RegisterHam(Ham_Player_PreThink"player""Ham_CBasePlayer_PreThink_Post"1)
}

public 
FM_client_AddToFullPack_Post(eseiEntidhostflagsplayerpSet)
{
    if( 
player && id != iEnt && get_orig_retval() && is_user_alive(id) )
    {
        
set_es(esES_SolidSOLID_NOT)

    }
}

public 
Ham_CBasePlayer_PreThink_Post(id)
{
    if( !
is_user_alive(id) )
    {
        return
    }

    
RefreshPlayersList()

    for(
0i<g_iNumi++)
    {
        
g_iPlayer g_iPlayers[i]
        if( 
id != g_iPlayer )
        {
            
set_pev(g_iPlayerpev_solidSOLID_NOT)
        }
    }
}

public 
client_PostThink(id)
{
    if( !
is_user_alive(id) )
    {
        return
    }

    
RefreshPlayersList()

    for(
0i<g_iNumi++)
    {
        
g_iPlayer g_iPlayers[i]
        if( 
g_iPlayer != id )
        {
            
set_pev(g_iPlayerpev_solidSOLID_SLIDEBOX)
        }
    }



Stefanos 07-31-2020 08:18

Re: Remove transparency?
 
i tried to compile even a default plugin and its same error could you please send me amxx ?

compiler\clipsemi.dat(8) : error 020: invalid symbol name ""

Stefanos 07-31-2020 08:19

Re: Remove transparency?
 
same error before and after editing for trasparency

Moody92 07-31-2020 08:22

Re: Remove transparency?
 
Compiles alright for me, make sure the file is in xxx.sma format and make sure you have latest stable AMXX

Quote:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Header size: 652 bytes
Code size: 1564 bytes
Data size: 568 bytes
Stack/heap size: 16384 bytes; estimated max. usage=46 cells (184 bytes)
Total requirements: 19168 bytes
Done.

Stefanos 07-31-2020 08:33

Re: Remove transparency?
 
AMX Mod X Compiler 1.8.3-dev+5201
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Usage: <file.sma> [options]
Use -? or --help to see full options

ZaX 07-31-2020 08:58

Re: Remove transparency?
 
why are you using .dat file extension? you can clearly see the compiler says (USAGE FILE.SMA [OPTIONS])

Stefanos 07-31-2020 09:03

Re: Remove transparency?
 
it does not matter even with .sma i have same error. send me amxx someone please

Stefanos 07-31-2020 09:04

Re: Remove transparency?
 
and can someone set this parachute only for ADMIN_LEVEL_H
https://pastebin.com/qG30fh2h

OciXCrom 07-31-2020 09:06

Re: Remove transparency?
 
For the 50th time - send your code.

Try removing const MAX_PLAYERS = 32

Quote:

Originally Posted by Stefanos (Post 2712493)
and can someone set this parachute only for ADMIN_LEVEL_H
https://pastebin.com/qG30fh2h

Different request = different thread.

Stefanos 07-31-2020 09:10

Re: Remove transparency?
 
i sent my code READ how u say aghahaha

Stefanos 07-31-2020 09:11

Re: Remove transparency?
 
i dont want to spam in threads.. easier is like this

Stefanos 07-31-2020 09:12

Re: Remove transparency?
 
ok works now when i removed max players, now for parachute and thanks man

OciXCrom 07-31-2020 09:59

Re: Remove transparency?
 
Quote:

Originally Posted by Stefanos (Post 2712496)
i sent my code READ how u say aghahaha

I'm not talking about the parachute plugin, mr. reader.

Quote:

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

No, it's not and it's not organized. If someone wants to find help about a parachute plugin, he surely won't search for "remove transparency".

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 23:51.

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