Alright, so I want to know about the limits of a server (sbox_, wiremod, etc) before joining (waiting 30 minutes for their addons to download, waiting 5 more minutes just to finish loading) just to find out "Oh, guess they don't have what I want, bye."
I would like to now how I could get the server cvars much like gametracker. A lua, or C# examples would all be fine. Thanks
That's why tags exists on servers, you can't fetch cvars but you can get tags, not sure if those works in gmod since it uses a custom browser
What do you mean "Tags"?
And if you can't fetch cvars, how does gametracker do it?
Well, if you really wanna learn that, you gonna read this sv_tags and Server queries
I do not want the tags. I want the cvars, and sv_tags doesn't deliver the cvars.
sv_tags sends server capabilities cvars, that's you can see in the first link
I don't think you can at all without any special module that can ping ALL cvars, that would be awful expensive and easy to ddos
Alright, you may of just gave me my answer but I'll ask to confirm: Can you get server cvars through Valve's source queries? I don't need them all just a couple specific ones
According https://developer.valvesoftware.com/wiki/Server_queries you can get inside A2S_RULES all convars that were modified (Tags), not sure how to add custom tags descriptors since http://wiki.garrysmod.com/page/Enums/FCVAR doesn't describe anything about tags
Seems like sv_tags are not blocked in http://wiki.garrysmod.com/page/Blocked_ConCommands
So you can in your addon add your tag there and then verify it inside a server querier like https://github.com/xPaw/PHP-Source-Query/blob/master/Examples/View.php
But there's not just a lua way to solve this
Okay so I decided to test it out and see if it does what I want but that example doesn't work. SourceQuery doesn't return any information. (Example.php, View.php)
Most server hosts block A2S_Rules. You are probably going to have to join the server to get the cvars.
If this is the case, how does gametracker do it? Because for every server on gametracker, I noticed they all have the cvars (except new servers that were just added)
If it truely isn't possible then I'll accept your answer, but gametracker almost always has the cvars.
I'm going to guess they have a custom client to query all these stuff. If you check their server variables list it says it is updated every 24 hours which is a lot less than how often they update player counts.
I'm pretty sure you need a token to get the server to respond to an A2S_RULES query. The documentation linked should have information on how to go about getting that token.
This is a fair point.
Do you know how I would go about making a "pseudo-client"?
Or perhaps even just some way to disable downloading content from servers so that I can check without waiting an hour.
Options > Other > Do not download any custom content
I'll test it next time I'm on GMOD(and able to play), but in the meantime if you answer this before I play GMOD, Does this disable downloading ALL addons (aside from obviously required lua files, I don't need anything to work properly just while I check if it has what I need)
Sorry, you need to Log In to post a reply to this thread.