GoldenEye: Source Forums
Debriefing => Questions, Help, & How To's => Topic started by: papel on October 20, 2017, 03:25:04 pm
-
Hello,
I would like to know which command or event shows the current game mode on my server. For example, the ge_gameplay command sets the current gameplay mode. I need to know if there is a command that displays or if any event records this information to display on the external server.
Thank you all.
-
Can you not just get the current value of ge_gameplay?
If you're trying to get this info from another server, you can get it over the Source query protocol: https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol
A quick search shows there's already PHP, Python, etc implementations of this protocol.
-
What if I need to know the current mode of the game for a plugin, how could I do it?
To explain better:
To know the current map use only "GetCurrentMap ()". Is there any way to do this to get the "GamePlay" (LTK, Arsenal ...).
Translated by Google Translate
-
Can you not just get the current value of ge_gameplay?
If you're trying to get this info from another server, you can get it over the Source query protocol: https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol
A quick search shows there's already PHP, Python, etc implementations of this protocol.
soupcan, thanks for the help, friend!
As papapox said, we need the name of the event that shows the current gameplay. Our idea is to export this information to a web page where other players will be aware of what is happening in the game. We could not do this using the ge_gameplay command.
-
The best way to do that is over the Source query protocol. There's multiple implementations, including in PHP (https://github.com/xPaw/PHP-Source-Query), which is what I'd assume the web application would be written in.
I'll send E-S this post since he'd know if there's a way to get that info from plugins, but a plugin for this is overkill if all you really need is info on the current state of the server. Depending on your needs, you might also be interested in HLX:CE (https://bitbucket.org/Maverick_of_UC/hlstatsx-community-edition/wiki/Home).
-
Gamemodes actually write their identity to a base HL2 field so they show up in the server browser under "game". If I recall correctly, this is the GameDescription, so just call this function and you should get what you're after:
https://sm.alliedmods.net/api/index.php?fastload=show&id=101&
Let me know if that doesn't work for whatever reason, and I'll dive into the code to figure out what you need to do.
-
It is! Thank you. We did what we wanted.
If you want to check the result look at the link (http://acquestoes.com/foxStatistics/ (http://acquestoes.com/foxStatistics/)) - still in development, but with information in real time.
Once again, thank you!
Translated by Google Translate
-
Looking pretty cool! I can't wait to see the finished product.
-
Entropy-Soldier, without your help we would not be able to. Thanks for everything. I hope someday you can join our server and play.
soupcan, thank you too. We know HLX: CE but from the beginning Papafox and I tried to do something more appropriate for GES, with points for gameplay.