Raised This Month: $32 Target: $400
 8% 

Solved Get playerlist with php


Post New Thread Reply   
 
Thread Tools Display Modes
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-23-2017 , 05:08   Re: Get playerlist with php
Reply With Quote #11

Possible to show STEAM ID?
4ever16 is offline
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 12-23-2017 , 05:55   Re: Get playerlist with php
Reply With Quote #12

Quote:
Originally Posted by 4ever16 View Post
Possible to show STEAM ID?
steam_id isn't shown in $playerData array, so for now - no (maybe u can retrieve steam_id using other methods with RCON, idk actually).
__________________

Last edited by Airkish; 12-23-2017 at 05:57.
Airkish is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 12-23-2017 , 08:39   Re: Get playerlist with php
Reply With Quote #13

Quote:
Originally Posted by Airkish View Post
steam_id isn't shown in $playerData array, so for now - no (maybe u can retrieve steam_id using other methods with RCON, idk actually).
Steam ID's does indeed not seem to be included with the HLDS/Source Query protocols so far.

On my SRCDS-based servers, I therefore created a custom "status" command, e.g. "some_fancy_status", which would give exactly the output that I needed, and a format that would be easily parse-able by eventual other programming languages, so I could access that command over the RCON protocol.

As said in OP, GameTracker does track players, but they do that using player names: One player called "John" (STEAM_1:1:1) and another player called "John" (STEAM_1:1:2) would actually (and unfortunately) be the same player on GameTracker.

In order to make it possible to do things any different than that, it appears you will have to convince Valve to include Steam ID's of the players with the HLDS/Source query protocols. You would have my +1 vote on this though.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-23-2017 , 09:53   Re: Get playerlist with php
Reply With Quote #14

It should be possible to easily implement a protocol similar to A2S_PLAYER request using this API from DLL_FUNCTIONS:
Code:
// Return 1 if the packet is valid.  Set response_buffer_size if you want to send a response packet.  Incoming, it holds the max
//  size of the response_buffer, so you must zero it out if you choose not to respond.
int	(*pfnConnectionlessPacket ) ( const struct netadr_s *net_from_, const char *args, char *response_buffer, int *response_buffer_size );
Sadly it will work only for servers running this modification.
__________________

Last edited by klippy; 12-23-2017 at 09:56.
klippy is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-23-2017 , 12:36   Re: Get playerlist with php
Reply With Quote #15

Thanks for the answers will see i will try to ask them.

Ok but can i get team?

(CT) Player 1
(T) Player 2
4ever16 is offline
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 12-23-2017 , 12:46   Re: Get playerlist with php
Reply With Quote #16

Quote:
Originally Posted by 4ever16 View Post
Thanks for the answers will see i will try to ask them.

Ok but can i get team?

(CT) Player 1
(T) Player 2
Nope, I suggest you making a plugin which would insert to MySQL all your needed data.
__________________
Airkish is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode