View Single Post
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 11-28-2022 , 01:02   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #10

Can you provide the map ? I can not find it on the internet, or any server running it.

In the meanwhile try this too:

PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>

#define PLUGIN "Hide goalnets [SJ]"
#define AUTHOR "deprale"
#define VERSION "1.0"
#define MAX_ENTITIES 1372

new g_Hide[MAX_PLAYERS 1];
new 
bool:g_bGoalNetEntity[MAX_ENTITIES];

public 
plugin_init( )
{
    
register_pluginPLUGINVERSIONAUTHOR )
    
register_clcmd"say /net""cmd_net" )
    
register_forwardFM_AddToFullPack"fwdAddToFullPack_Post")

}

public 
plugin_cfg( ) {
    new 
ent = -1
    
while( ( ent find_ent_by_classent"func_illusionary" ) ) != )
    {        
        
g_bGoalNetEntityent ] = true
    
}
    while( ( 
ent find_ent_by_classent"soccerjam_goalnet" ) ) != )
    {        
        
g_bGoalNetEntityent ] = true
    
}
}

public 
cmd_netid )
{
    switch( 
g_Hideid ] ){
        case 
0g_Hideid ] = true
        
case 1g_Hideid ] = false
    
}
    
client_print_coloridprint_team_default"^4Hide nets^1:^3 %s"g_Hideid ] ? "Yes" "No" )
}

public 
client_connectedid )
{
    
g_Hideid ] = false
}

public 
client_disconnectedid )
{
    
g_Hideid ] = false
}

public 
fwdAddToFullPack_Postes_handleeentiHosthostflagsplayerpset )
{
    if ( !
g_HideiHost ] )
        return 
FMRES_IGNORED

    
if ( g_bGoalNetEntityent ] )
        
set_eses_handleES_Effectsget_eses_handleES_Effects ) | EF_NODRAW )

    return 
FMRES_IGNORED

Downloaded some other maps and apparently it either is func_illusionary or soccerjam_goalnet entities usually (confirmed by both amxx and bspguy)
__________________

Last edited by deprale; 11-28-2022 at 01:06.
deprale is offline