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

Quote:
Originally Posted by sanimare View Post
Super
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
    
}
}

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




This in theory should work on all maps/plugins unless they used different entity names for goalnets, which in that case I will provide you with further instructions/help.
__________________

Last edited by deprale; 11-27-2022 at 03:32. Reason: forgot smth
deprale is offline