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_plugin( PLUGIN, VERSION, AUTHOR )
register_clcmd( "say /net", "cmd_net" )
register_forward( FM_AddToFullPack, "fwdAddToFullPack_Post", 1 )
}
public plugin_cfg( ) {
new ent = -1
while( ( ent = find_ent_by_class( ent, "func_illusionary" ) ) != 0 )
{
g_bGoalNetEntity[ ent ] = true
}
while( ( ent = find_ent_by_class( ent, "soccerjam_goalnet" ) ) != 0 )
{
g_bGoalNetEntity[ ent ] = true
}
}
public cmd_net( id )
{
switch( g_Hide[ id ] ){
case 0: g_Hide[ id ] = true
case 1: g_Hide[ id ] = false
}
client_print_color( id, print_team_default, "^4Hide nets^1:^3 %s", g_Hide[ id ] ? "Yes" : "No" )
}
public client_connected( id )
{
g_Hide[ id ] = false
}
public client_disconnected( id )
{
g_Hide[ id ] = false
}
public fwdAddToFullPack_Post( es_handle, e, ent, iHost, hostflags, player, pset )
{
if ( !g_Hide[ iHost ] )
return FMRES_IGNORED
if ( g_bGoalNetEntity[ ent ] )
set_es( es_handle, ES_Effects, get_es( es_handle, ES_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)
__________________