Possible to make server query like: GetPlayers( )? (PHP-Source-Query-Class)

Possible to make server query like: GetPlayers( )? (PHP-Source-Query-Class)

For example it should return some information like roles of players or current number of round.

Not unless you write your own socket plugin / console command that you run so you can parse it’s output. Make yourself a Lua script that outputs a json string containing all players and their roles / number of rounds (whatever that may be), and let it run when you type a specific console command. Make it a serverside console command so clients can’t run it. Then, use RCon to send that command and read it’s output, parse it to an array using $array = json_decode($string, TRUE) and there you go.

edit:
Thinking of what I said here, I struggled parsing the output of console “status” command, while I ran my community. I parsed this from 13 servers, every minute. What a struggle, could have done it simpler, without using so much resources :’)

parsing is no problem, but output… i guess it’s BINary plugin, right?

You don’t have to write yourself a module if you do what I told you…

oh ok, but how to catch convar value from Rcon command?

You already knew you could use the PHP-Source-Query-Class, so why don’t you look at the RCon Example they provide you?

Here they show you exactly how it works and how to catch it’s output.

Oh Thank you! I did it!