I saw already server with hidden net of goal, but server is shutted down. It was command and in menu you could choose to hide or show goal net, but ofcourse not remove, just hide, so you can jump on goal and do tricks and stuff, where is the all fun in this mod.
Sma ->
https://github.com/Doondook/soccerjam, or just need to make new plugin to do something to this map bsp. Here is all i have, i'm glad if someone could help with this.
Also, here is the map in .zip file called soccerjam_sunrise_v3 and .sma original is also there
https://github.com/Doondook/soccerjam, i just put into code so you can see if something is in there that can help just from seeing this post. Thank's.
WORKING:
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#define PLUGIN " [SJ]Hide goalnets FINAL"
#define AUTHOR "deprale"
#define VERSION "1.0"
#define MAX_ENTITIES 1372
#define Z_AXIS 2
#define Y_AXIS 1
#define X_AXIS 0
new g_Hide[ MAX_PLAYERS + 1 ];
new bool:g_bGoalNetEntity[ MAX_ENTITIES ];
new g_Strings[][] = {
{ "net" }/*,
{ "if you wanna add more dont forget about the commas, only the last element doesn't need a comma "{ },<< this here" "} << last element no comma example*/
}
public plugin_init( )
{
register_plugin( PLUGIN, VERSION, AUTHOR )
register_forward( FM_AddToFullPack, "fwdAddToFullPack_Post", 1 )
register_clcmd( "say /net", "cmd_net" )
}
public plugin_cfg()
{
trace_textures(Z_AXIS)
trace_textures(Y_AXIS)
}
public trace_textures(const axis)
{
new ent = -1
while ((ent != MAX_ENTITIES)) {
ent++
if(is_valid_ent(ent)) {
new Float:fOrigin[ 3 ], Float:vEndOrigin[ 3 ],
szTexture[ MAX_NAME_LENGTH ]
get_brush_entity_origin( ent, fOrigin ) //You don't wanna know how much hours I spent researching till I found out how to do it properly.
vEndOrigin = fOrigin
vEndOrigin[axis] = 8191.0
engfunc( EngFunc_TraceTexture, ent, fOrigin, vEndOrigin, szTexture, charsmax( szTexture ) )
for (new i = 0; i < sizeof(g_Strings); i++)
{
if(contain(szTexture, g_Strings[i]) != -1)
{
g_bGoalNetEntity[ent] = true
//server_print( "DETECTED" )
}
}
//server_print( "^nentid:%i^ntexture:%s^norigin[0]:%f^norigin[1]:%f^norigin[2]:%f^n", ent, szTexture, vEndOrigin[ 0 ],vEndOrigin[ 1 ],vEndOrigin[ 2 ] )
}
}
}
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, "^3Hide nets status^4:^3%s^4!", g_Hide[ id ] ? "ON" : "OFF" )
return PLUGIN_HANDLED //don't let the command be shown in chat (annoying for others)
}
public client_connect( 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
}