Raised This Month: $32 Target: $400
 8% 

Solved SoccerJam Goal Net hide (MAP & MOD)


Post New Thread Reply   
 
Thread Tools Display Modes
sanimare
Senior Member
Join Date: Sep 2010
Old 11-30-2022 , 10:59   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #21

Quote:
Originally Posted by deprale View Post
You might have plugins that create entities on the map, place my plugin above all please try that and if it doesn't work just follow my video.
It is already above the mod and other plugins. Working good on soccerjam2017, soccerjam, only, the others are not working well, some entities hidden, some are not..

i even treid to disable all plugins but this one you last posted as update and it's very strange, only entity from above is invsible and the one from the back is visible on both goals on soccerjam_sunrise_v3.bsp

AMXX Version
Code:
AMX Mod X 1.9.0.5294
ReHLDS Version
Code:
ReHLDS version: 3.12.0.780-dev

Last edited by sanimare; 11-30-2022 at 11:07.
sanimare is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 11-30-2022 , 11:30   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #22

That is very weird, can you try updating amxx to 1.10? And let me know, otherwise I'll make a function to search for the nearest entities with a command, that will be printed in console and then you can find them easier without the need of a map editor, and from there it's just trial and error to see which one is the one you need.

The only difference I see from your setup to mine is the amxx version so maybe there were some changes in entity handling.
__________________
deprale is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 11-30-2022 , 17:39   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #23

I can't compile soccerjam+.sma in 1.1.0 i tried, but did u change anything in .sma? All other modules, plugins i did transfer to 1.1.0, only mod i can't make work, but now one goal net from back is invisible and top of goal net is visible and other goal is fully visible goal nets, even with 1.1.0 without mod...
sanimare is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 11-30-2022 , 18:08   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #24

Ok what we gonna do is that I will come home and modify the plugin and give you the ability to aim at a entity and get it's id and set it to invisible if you type /net, then you can add that into the plugin.
__________________
deprale is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 11-30-2022 , 19:24   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #25

That's awesome, i followed the video but i can't make it in console to show that entity's in console, idk why, but i think its problem with amxx version that we didn't use the same, i'll go back to 1.9 and if you do that plugin great, if not, you must show me step by step how to see entity's in video and i will find them by my own, cuz i didn't catch only that thing how to do it in those videos, i only see them but everything i tried i can't show them in my console, cuz probably im doing it in another way. Thank's
sanimare is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 12-02-2022 , 05:09   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #26

You can scratch all of that off, it seems like with the soccerjam plugin loaded it's impossible to accurately predict which one of the models it is - my bad.


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

new g_HideMAX_PLAYERS ];
new 
bool:g_bGoalNetEntityMAX_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_pluginPLUGINVERSIONAUTHOR )

    
register_forwardFM_AddToFullPack"fwdAddToFullPack_Post")

    
register_clcmd"say /net""cmd_net" )
}

public 
plugin_cfg()
{
    new 
ent = -1
    
while ((ent != MAX_ENTITIES)) {
        
ent++
        if(
is_valid_ent(ent)) {
            new 
Float:fOrigin], Float:vEndOrigin],
                
szTextureMAX_NAME_LENGTH ]

            
get_brush_entity_originentfOrigin //You don't wanna know how much hours I spent researching till I found out how to do it properly.
            
vEndOrigin fOrigin
            vEndOrigin
[2] = 8191.0

            engfunc
EngFunc_TraceTextureentfOriginvEndOriginszTexturecharsmaxszTexture ) )

            for (new 
0sizeof(g_Strings); i++)
            {
                if(
contain(szTextureg_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_netid )
{
    switch( 
g_Hideid ])
    {
        case 
0g_Hideid ] = true
        
case 1g_Hideid ] = false
    
}

    
client_print_color(idprint_team_default"^3Hide nets status^4:^3%s^4!"g_Hideid ] ? "ON" "OFF" )

    return 
PLUGIN_HANDLED     //don't let the command be shown in chat (annoying for others)
}

public 
client_connectid )
{
    
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

It took me WAAAAAAAAAY too long with this one... Also it still doesn't sort of work on soccerjam_sunrise_v3, but it works properly on ALL THE OTHER ONES and you will never have to edit the source code or manually add entities in arrays BUT you might have to uncomment the prints if you ever find a map that has the goalnets with different strings in different languages or something like that, I might or might not come back with another reply if I decide to sink another 5+ hours on this one to find out why the nets on sunrise don't get hidden properly (only the top does)
__________________

Last edited by deprale; 12-02-2022 at 05:13.
deprale is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 12-03-2022 , 09:49   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #27

Yea, that map soccerjam_sunrise_v3 is the newest and most players play only that map, last server that was working with option to hide goal net it was on that map with no issues, so it's probably possible to do it.
sanimare is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 12-03-2022 , 10:28   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #28

Quote:
Originally Posted by sanimare View Post
Yea, that map soccerjam_sunrise_v3 is the newest and most players play only that map, last server that was working with option to hide goal net it was on that map with no issues, so it's probably possible to do it.
Yeah I was thinking it's because the nets are made from multiple models/entities, because each face returns a different value ._. and the ray I'm casting is from above for each entity, so therefore it might be casted to a point where it returns notexture, I'll try some things.

There you go! Final final final version I hope...
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_HideMAX_PLAYERS ];
new 
bool:g_bGoalNetEntityMAX_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_pluginPLUGINVERSIONAUTHOR )

    
register_forwardFM_AddToFullPack"fwdAddToFullPack_Post")

    
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], Float:vEndOrigin],
                
szTextureMAX_NAME_LENGTH ]

            
get_brush_entity_originentfOrigin //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_TraceTextureentfOriginvEndOriginszTexturecharsmaxszTexture ) )

            for (new 
0sizeof(g_Strings); i++)
            {
                if(
contain(szTextureg_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_netid )
{
    switch( 
g_Hideid ])
    {
        case 
0g_Hideid ] = true
        
case 1g_Hideid ] = false
    
}

    
client_print_color(idprint_team_default"^3Hide nets status^4:^3%s^4!"g_Hideid ] ? "ON" "OFF" )

    return 
PLUGIN_HANDLED     //don't let the command be shown in chat (annoying for others)
}

public 
client_connectid )
{
    
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

Works on all maps I tested even soccerjam_sunrise_v3, have fun!
__________________

Last edited by deprale; 12-03-2022 at 11:32.
deprale is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 12-03-2022 , 11:40   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #29

It's finally working good
One more thing if you can check on server you created while u have mod on and if you know what is going on, it's about goal, i can stand on line on other similar server with this mod, and i tried also map removing from server and my cstrike and redownloading from that server, but it's not it, if you know is that plugin side or what i need to try to fix it, here are the pictures:

My server


Other server
sanimare is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 12-03-2022 , 12:45   Re: SoccerJam Goal Net hide (MAP & MOD)
Reply With Quote #30

I don't know what you're talking about, on my server I can stand on the line.
On your server it looks like the goal posts are different I don't know what it is, but you might have something missing or different.




Also for different requests you make different topics, sorry.
__________________
deprale is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode