Closed exababy closed 3 months ago
I forgot to say that I tried with the requestRules: true variable and the result is the same
Hey, could you run the command with --debug
? CS2 (or CSGO) should respond on requestRules: true
but if they do not, its normal for the players field to be filled with empty objects (with N objects where N is the number of online players), this will be removed as it causes more confusion than it helps.
/ Q#0 Starting Q#0 Protocol: Valve Q#0 Options: { socketTimeout: 2000, attemptTimeout: 10000, maxAttempts: 1, ipFamily: 0, port: 27015, protocol: 'valve', requestRules: true, type: 'csgo', host: '185.171.25.31', debug: true } Q#0 DNS Lookup: 185.171.25.31 Q#0 Raw IP Address: 185.171.25.31 Q#0 Requesting info ... 185.171.25.31:27015 UDP(60892)--> Buffer length: 25 bytes ff ff ff ff 54 53 6f 75 72 63 65 20 45 6e 67 69 6e 65 20 51 75 T S o u r c e E n g i n e Q u 65 72 79 00 e r y 185.171.25.31:27015 <--UDP(60892) Buffer length: 9 bytes ff ff ff ff 41 42 6e 03 f8 A B n Q#0 Registered RTT: 36ms Q#0 Received full packet Q#0 Received 0x41 expected 0x49 Q#0 Received new challenge key: 0xf8036e42 Q#0 UDP send finished by callback 185.171.25.31:27015 UDP(60892)--> Buffer length: 29 bytes ff ff ff ff 54 53 6f 75 72 63 65 20 45 6e 67 69 6e 65 20 51 75 T S o u r c e E n g i n e Q u 65 72 79 00 42 6e 03 f8 e r y B n 185.171.25.31:27015 <--UDP(60892) Buffer length: 197 bytes ff ff ff ff 49 11 5b 54 52 5d 20 48 65 6c 69 6f 73 20 7c 20 50 I [ T R ] H e l i o s | P 72 6f 26 50 75 62 6c 69 63 20 7c 20 64 69 73 63 6f 72 64 2e 67 r o & P u b l i c | d i s c o r d . g 67 2f 68 67 61 20 2d 20 6f 79 75 6e 74 65 63 68 2e 63 6f 6d 00 g / h g a - o y u n t e c h . c o m 64 65 5f 69 6e 66 65 72 6e 6f 00 63 73 67 6f 00 43 6f 75 6e 74 d e _ i n f e r n o c s g o C o u n t 65 72 2d 53 74 72 69 6b 65 20 32 00 da 02 1d 1e 00 64 6c 00 01 e r - S t r i k e 2 d l 31 2e 33 39 2e 36 2e 34 00 b1 87 69 91 e6 2d 00 00 00 30 01 21 1 . 3 9 . 6 . 4 i - 0 ! 65 6c 64 69 76 65 6e 2c 21 77 73 2c 44 65 61 67 6c 65 2c 4f 79 e l d i v e n , ! w s , D e a g l e , O y 75 6e 54 45 43 48 2c 54 52 2c 5b 54 52 5d 2c 61 69 6d 2c 61 77 u n T E C H , T R , [ T R ] , a i m , a w 70 2c 64 65 61 67 6c 65 2c 64 6d 2c 66 75 6c 6c 2c 66 75 6e 00 p , d e a g l e , d m , f u l l , f u n da 02 00 00 00 00 00 00 Q#0 Registered RTT: 36ms Q#0 Received full packet Q#0 Received 0x49 expected 0x49 Q#0 UDP send finished by callback Q#0 INFO: { protocol: 17, folder: 'csgo', game: 'Counter-Strike 2', appId: 730, numplayers: 29, numbots: 0, listentype: 'd', environment: 'l', secure: 1, version: '1.39.6.4', steamid: '85568392923047569', tags: [ '!eldiven', '!ws', 'Deagle', 'OyunTECH', 'TR', '[TR]', 'aim', 'awp', 'deagle', 'dm', 'full', 'fun' ] } Q#0 Requesting player list ... 185.171.25.31:27015 UDP(60892)--> Buffer length: 9 bytes ff ff ff ff 55 42 6e 03 f8 U B n 185.171.25.31:27015 <--UDP(60892) Buffer length: 296 bytes ff ff ff ff 44 1d 00 00 00 00 00 00 0f 89 fb 45 00 00 00 00 00 D E 00 fb 30 d3 45 00 00 00 00 00 00 71 13 94 45 00 00 00 00 00 00 0 E q E 4e 43 91 45 00 00 00 00 00 00 fd ba 89 45 00 00 00 00 00 00 2a N C E E * f0 7b 45 00 00 00 00 00 00 7f 6c 53 45 00 00 00 00 00 00 c4 0e { E l S E 3c 45 00 00 00 00 00 00 36 1e 22 45 00 00 00 00 00 00 d7 7a 1d < E 6 " E z 45 00 00 00 00 00 00 83 f3 12 45 00 00 00 00 00 00 7f 13 12 45 E E E 00 00 00 00 00 00 86 7b 0e 45 00 00 00 00 00 00 fc dd 05 45 00 { E E 00 00 00 00 00 d0 4c fe 44 00 00 00 00 00 00 62 18 ec 44 00 00 L D b D 00 00 00 00 69 63 e6 44 00 00 00 00 00 00 87 65 d5 44 00 00 00 i c D e D 00 00 00 11 02 cc 44 00 00 00 00 00 00 0c fc ca 44 00 00 00 00 D D 00 00 5d 01 a3 44 00 00 00 00 00 00 ff 22 85 44 00 00 00 00 00 ] D " D 00 89 15 00 44 00 00 00 00 00 00 2d 80 df 43 00 00 00 00 00 00 D - C 29 2a be 43 00 00 00 00 00 00 a0 8e 0a 43 00 00 00 00 00 00 92 ) * C C 4f d4 42 00 00 00 00 00 00 0c 7f bf 42 00 00 00 00 00 00 f1 60 O B B ` 03 42 B Q#0 Registered RTT: 37ms Q#0 Received full packet Q#0 Received 0x44 expected 0x44 Q#0 UDP send finished by callback Q#0 Found player: 0 8049.13232421875 Q#0 Found player: 0 6758.12255859375 Q#0 Found player: 0 4738.43017578125 Q#0 Found player: 0 4648.4130859375 Q#0 Found player: 0 4407.37353515625 Q#0 Found player: 0 4031.01025390625 Q#0 Found player: 0 3382.781005859375 Q#0 Found player: 0 3008.9228515625 Q#0 Found player: 0 2593.88818359375 Q#0 Found player: 0 2519.677490234375 Q#0 Found player: 0 2351.219482421875 Q#0 Found player: 0 2337.218505859375 Q#0 Found player: 0 2279.72021484375 Q#0 Found player: 0 2141.8740234375 Q#0 Found player: 0 2034.400390625 Q#0 Found player: 0 1888.761962890625 Q#0 Found player: 0 1843.1065673828125 Q#0 Found player: 0 1707.1727294921875 Q#0 Found player: 0 1632.0645751953125 Q#0 Found player: 0 1623.87646484375 Q#0 Found player: 0 1304.0426025390625 Q#0 Found player: 0 1065.0936279296875 Q#0 Found player: 0 512.3364868164062 Q#0 Found player: 0 447.0013732910156 Q#0 Found player: 0 380.3293762207031 Q#0 Found player: 0 138.55712890625 Q#0 Found player: 0 106.15541076660156 Q#0 Found player: 0 95.74813842773438 Q#0 Found player: 0 32.844669342041016 Q#0 Requesting rules ... 185.171.25.31:27015 UDP(60892)--> Buffer length: 9 bytes ff ff ff ff 56 42 6e 03 f8 V B n Q#0 UDP timeout detected Q#0 UDP timeout resolved by callback Q#0 Size of players array: 29 Q#0 Size of bots array: 0 Q#0 Query was successful { "name": "[TR] Helios | Pro&Public | discord.gg/hga - oyuntech.com", "map": "de_inferno", "password": false, "raw": { "protocol": 17, "folder": "csgo", "game": "Counter-Strike 2", "appId": 730, "numplayers": 29, "numbots": 0, "listentype": "d", "environment": "l", "secure": 1, "version": "1.39.6.4", "steamid": "85568392923047569", "tags": [ "!eldiven", "!ws", "Deagle", "OyunTECH", "TR", "[TR]", "aim", "awp", "deagle", "dm", "full", "fun" ], "rules": {} }, "maxplayers": 30, "players": [ { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} } ], "bots": [], "connect": "185.171.25.31:27015", "ping": 36 }
Q#0 Starting Q#0 Protocol: Valve Q#0 Options: { socketTimeout: 2000, attemptTimeout: 10000, maxAttempts: 1, ipFamily: 0, port: 27015, protocol: 'valve', requestRules: false, type: 'csgo', host: '185.171.25.31', debug: true } Q#0 DNS Lookup: 185.171.25.31 Q#0 Raw IP Address: 185.171.25.31 Q#0 Requesting info ... 185.171.25.31:27015 UDP(40967)--> Buffer length: 25 bytes ff ff ff ff 54 53 6f 75 72 63 65 20 45 6e 67 69 6e 65 20 51 75 T S o u r c e E n g i n e Q u 65 72 79 00 e r y 185.171.25.31:27015 <--UDP(40967) Buffer length: 9 bytes ff ff ff ff 41 ba 7e 0b f7 A ~ Q#0 Registered RTT: 36ms Q#0 Received full packet Q#0 Received 0x41 expected 0x49 Q#0 Received new challenge key: 0xf70b7eba Q#0 UDP send finished by callback 185.171.25.31:27015 UDP(40967)--> Buffer length: 29 bytes ff ff ff ff 54 53 6f 75 72 63 65 20 45 6e 67 69 6e 65 20 51 75 T S o u r c e E n g i n e Q u 65 72 79 00 ba 7e 0b f7 e r y ~ 185.171.25.31:27015 <--UDP(40967) Buffer length: 197 bytes ff ff ff ff 49 11 5b 54 52 5d 20 48 65 6c 69 6f 73 20 7c 20 50 I [ T R ] H e l i o s | P 72 6f 26 50 75 62 6c 69 63 20 7c 20 64 69 73 63 6f 72 64 2e 67 r o & P u b l i c | d i s c o r d . g 67 2f 68 67 61 20 2d 20 6f 79 75 6e 74 65 63 68 2e 63 6f 6d 00 g / h g a - o y u n t e c h . c o m 64 65 5f 69 6e 66 65 72 6e 6f 00 63 73 67 6f 00 43 6f 75 6e 74 d e _ i n f e r n o c s g o C o u n t 65 72 2d 53 74 72 69 6b 65 20 32 00 da 02 1d 1e 00 64 6c 00 01 e r - S t r i k e 2 d l 31 2e 33 39 2e 36 2e 34 00 b1 87 69 91 e6 2d 00 00 00 30 01 21 1 . 3 9 . 6 . 4 i - 0 ! 65 6c 64 69 76 65 6e 2c 21 77 73 2c 44 65 61 67 6c 65 2c 4f 79 e l d i v e n , ! w s , D e a g l e , O y 75 6e 54 45 43 48 2c 54 52 2c 5b 54 52 5d 2c 61 69 6d 2c 61 77 u n T E C H , T R , [ T R ] , a i m , a w 70 2c 64 65 61 67 6c 65 2c 64 6d 2c 66 75 6c 6c 2c 66 75 6e 00 p , d e a g l e , d m , f u l l , f u n da 02 00 00 00 00 00 00 Q#0 Registered RTT: 53ms Q#0 Received full packet Q#0 Received 0x49 expected 0x49 Q#0 UDP send finished by callback Q#0 INFO: { protocol: 17, folder: 'csgo', game: 'Counter-Strike 2', appId: 730, numplayers: 29, numbots: 0, listentype: 'd', environment: 'l', secure: 1, version: '1.39.6.4', steamid: '85568392923047569', tags: [ '!eldiven', '!ws', 'Deagle', 'OyunTECH', 'TR', '[TR]', 'aim', 'awp', 'deagle', 'dm', 'full', 'fun' ] } Q#0 Requesting player list ... 185.171.25.31:27015 UDP(40967)--> Buffer length: 9 bytes ff ff ff ff 55 ba 7e 0b f7 U ~ 185.171.25.31:27015 <--UDP(40967) Buffer length: 296 bytes ff ff ff ff 44 1d 00 00 00 00 00 00 27 d4 00 46 00 00 00 00 00 D ' F 00 3a 50 d9 45 00 00 00 00 00 00 b0 32 9a 45 00 00 00 00 00 00 : P E 2 E 8d 62 97 45 00 00 00 00 00 00 3b da 8f 45 00 00 00 00 00 00 54 b E ; E T 17 84 45 00 00 00 00 00 00 fd aa 5f 45 00 00 00 00 00 00 42 4d E _ E B M 48 45 00 00 00 00 00 00 b3 5c 2e 45 00 00 00 00 00 00 55 b9 29 H E \ . E U ) 45 00 00 00 00 00 00 01 32 1f 45 00 00 00 00 00 00 fd 51 1e 45 E 2 E Q E 00 00 00 00 00 00 03 ba 1a 45 00 00 00 00 00 00 7a 1c 12 45 00 E z E 00 00 00 00 00 af 4a 02 45 00 00 00 00 00 00 64 e0 fe 44 00 00 J E d D 00 00 00 00 83 e2 ed 44 00 00 00 00 00 00 0c 7f e4 44 00 00 00 D D 00 00 00 07 79 e3 44 00 00 00 00 00 00 59 7e bb 44 00 00 00 00 y D Y ~ D 00 00 fa 9f 9d 44 00 00 00 00 00 00 80 0f 31 44 00 00 00 00 00 D 1 D 00 0d ba 20 44 00 00 00 00 00 00 0c 0f 10 44 00 00 00 00 00 00 D D 3e 3b a7 43 00 00 00 00 00 00 d2 07 97 43 00 00 00 00 00 00 18 > ; C C c0 64 43 00 00 00 00 00 00 3c 92 fe 42 00 00 00 00 00 00 46 5f d C < B F _ 68 42 h B Q#0 Registered RTT: 37ms Q#0 Received full packet Q#0 Received 0x44 expected 0x44 Q#0 UDP send finished by callback Q#0 Found player: 0 8245.0380859375 Q#0 Found player: 0 6954.0283203125 Q#0 Found player: 0 4934.3359375 Q#0 Found player: 0 4844.31884765625 Q#0 Found player: 0 4603.27880859375 Q#0 Found player: 0 4226.916015625 Q#0 Found player: 0 3578.686767578125 Q#0 Found player: 0 3204.82861328125 Q#0 Found player: 0 2789.793701171875 Q#0 Found player: 0 2715.583251953125 Q#0 Found player: 0 2547.125244140625 Q#0 Found player: 0 2533.124267578125 Q#0 Found player: 0 2475.625732421875 Q#0 Found player: 0 2337.77978515625 Q#0 Found player: 0 2084.667724609375 Q#0 Found player: 0 2039.01220703125 Q#0 Found player: 0 1903.0784912109375 Q#0 Found player: 0 1827.97021484375 Q#0 Found player: 0 1819.7821044921875 Q#0 Found player: 0 1499.9483642578125 Q#0 Found player: 0 1260.999267578125 Q#0 Found player: 0 708.2421875 Q#0 Found player: 0 642.9070434570312 Q#0 Found player: 0 576.235107421875 Q#0 Found player: 0 334.46282958984375 Q#0 Found player: 0 302.06109619140625 Q#0 Found player: 0 228.7503662109375 Q#0 Found player: 0 127.28561401367188 Q#0 Found player: 0 58.093040466308594 Q#0 Size of players array: 29 Q#0 Size of bots array: 0 Q#0 Query was successful { "name": "[TR] Helios | Pro&Public | discord.gg/hga - oyuntech.com", "map": "de_inferno", "password": false, "raw": { "protocol": 17, "folder": "csgo", "game": "Counter-Strike 2", "appId": 730, "numplayers": 29, "numbots": 0, "listentype": "d", "environment": "l", "secure": 1, "version": "1.39.6.4", "steamid": "85568392923047569", "tags": [ "!eldiven", "!ws", "Deagle", "OyunTECH", "TR", "[TR]", "aim", "awp", "deagle", "dm", "full", "fun" ] }, "maxplayers": 30, "players": [ { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} } ], "bots": [], "connect": "185.171.25.31:27015", "ping": 36 }
Apparently, it does respond, but with just the duration on the server.
In GAMES_LIST.md, under Additional Notes
, CSGO (CS2) is listed there.
Shortly said, you need to have host_players_show 2
on the server for it to return players info.
there are 29 players on the server and still the same that command was removed in cs2
Hmm, not really sure whats going on here then, I will investigate and come back with a response.
I'll be looking forward to it thanks for your help
I would also like to add that we can pull player names with sourcequery maybe it'll help.
example.
Getting the same empty player names. Got 56 servers and they all show the same (multiple machines).
Tried using valve protocol directly and csgo (cs2 one not released on npm yet).
gamedig --type protocol-valve ip:port
gamedig --type csgo ip:port
Example;
{
"name": "example - fshost.me",
"map": "de_overpass",
"password": false,
"raw": {
"protocol": 17,
"folder": "csgo",
"game": "Counter-Strike 2",
"appId": 730,
"numplayers": 10,
"numbots": 0,
"listentype": "d",
"environment": "l",
"secure": 1,
"version": "1.39.6.4",
"steamid": "",
"tags": [
"empty",
"secure"
]
},
"maxplayers": 14,
"players": [
{
"name": "",
"raw": []
},
{
"name": "",
"raw": []
},
{
"name": "",
"raw": []
},
{
"name": "",
"raw": []
},
{
"name": "",
"raw": []
},
{
"name": "",
"raw": []
},
{
"name": "",
"raw": []
},
{
"name": "",
"raw": []
},
{
"name": "",
"raw": []
},
{
"name": "",
"raw": []
}
],
"bots": [],
"connect": "ip:port",
"ping": 0
}
Well, in the current state of CS2, it COULD be that Valve currently didnt added players to show on the A2S players query, will make a support ticket for this, thanks for testing out.
Responded with "Thanks for taking some time to provide feedback about Counter-Strike 2. I'm forwarding your comments on to the team so they can take a look.", they also suggested to open a thread on the discussions page on cs2, will do that.
Edit: Discussion thread here.
Hopefully they fix the query response as most of it is still CSGO based.
Also doesn't help that CS2 has bugs like this where the status
command shows players still online, even though they've all left!
status;
Server: Running [IP:Port]
Client: Disconnected
----- Status -----
@ Current : game
source : console
hostname : fshost.me
spawn : 4
version : 1.39.6.4/13964 9842 secure public
udp/ip : IP:Port
os/type : Linux dedicated
players : 11 humans, 0 bots (0 max) (not hibernating) (unreserved)
---------players--------
id time ping loss state rate adr name
65280 89:40:53 16 0 active 786432 IP:Port 'playername1'
1 89:40:57 22 0 active 786432 IP:Port 'playername2'
2 89:41:00 21 0 active 128000 IP:Port 'playername3'
3 89:40:48 25 0 active 786432 IP:Port 'playername4'
4 89:40:31 27 0 active 786432 IP:Port 'playername5'
5 89:40:26 16 0 active 786432 IP:Port 'playername6'
6 89:40:24 17 0 active 786432 IP:Port 'playername7'
7 89:40:23 15 0 active 786432 IP:Port 'playername8'
8 89:40:18 28 0 active 786432 IP:Port 'playername9'
9 89:40:14 15 0 active 196608 IP:Port 'playername10'
10 89:35:15 26 0 active 786432 IP:Port 'playername11'
#end
playername5 IP:Port[1]: incoming timing out, last received 54631.545987 [322295.81 seconds ago]
2 weeks passed since I've made that discussion thread, I've emailed the CS2 team regarding this matter.
Update: no response We will keep this issue as tracking for now.
update?
No update and the last CS2 update has actually broken the player list even more.
This is a valve issue, not a gamedig one.
https://github.com/Iksix/Iks_Api_GetPlayers/tree/main
Can a 3rd party like this be used?
https://github.com/Iksix/Iks_Api_GetPlayers/tree/main
Can a 3rd party like this be used?
That’s for CounterStrikeSharp. If you have it, try it out.
Sorry for hijacking but i suspect it could be related: players that has connected seems to still exist in the response
See below image, this is with the server having 0 online BUT total of 6 players HAS connected before
Sorry for hijacking but i suspect it could be related: players that has connected seems to still exist in the response
See below image, this is with the server having 0 online BUT total of 6 players HAS connected before
Yep, we're using a fix within metamod. Player names at last!
They seemed to have fixed this issue, please reopen if there are still problems regarding this.
node node_modules/gamedig/bin/gamedig --type csgo XXXXXXX {"name":"XXXXX","map":"de_mirage","password":false,"raw":{"protocol":17,"folder":"csgo","game":"Counter-Strike 2","appId":730,"numplayers":28,"numbots":0,"listentype":"d","environment":"l","secure":1,"version":"1.39.6.4","steamid":"XXX","tags":["!eldiven","!ws","Deagle","XX","TR","[TR]","aim","awp","deagle","dm","full","fun"]},"maxplayers":30,"players":[{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}},{"name":"","raw":{}}],"bots":[],"connect":"XXXXXXXXX","ping":35}
Why don't player names appear?