Hey there. I'm making a MOTD for a Garry's Mod server, and I'd like to know how to check what the current map is using either javascript or php. I'm sure there are tons of people out there that are smarter than me when it comes to things like this, so any help is appreciated! Thanks a ton.
Well, here's a start: [url]http://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol[/url]
More specifically: [url]http://developer.valvesoftware.com/wiki/User:Pizzahut/msqp.php[/url]
[QUOTE=samm5506;27005467]Well, here's a start: [url]http://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol[/url]
More specifically: [url]http://developer.valvesoftware.com/wiki/User:Pizzahut/msqp.php[/url][/QUOTE]
That looks very helpful, thank you. Do I need to specify a game with the second link or does it work automatically (since gmod is a half-life mod)?
[QUOTE=MyndPhreak;27007277]That looks very helpful, thank you. Do I need to specify a game with the second link or does it work automatically (since gmod is a half-life mod)?[/QUOTE]
You will have to change the master server IP to accommodate for GMod, since it uses the hl2 master server list. Here's the IP: hl2master.steampowered.com:27011
Also, the game name should be "garrysmod"
[QUOTE=samm5506;27005467]Well, here's a start: [url]http://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol[/url]
More specifically: [url]http://developer.valvesoftware.com/wiki/User:Pizzahut/msqp.php[/url][/QUOTE]
this is for querying the master server, not querying a specific game server for map information.
[url=http://www.facepunch.com/threads/823855]here's a php script i made a while ago for querying source game servers[/url], although your luck may vary with it.
Sorry, you need to Log In to post a reply to this thread.