View Single Post
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 04-19-2018 , 05:12   Re: [CSGO] Get client original clan tag
Reply With Quote #2

Quote:
Originally Posted by eyal282 View Post
As the title mentions, how can I know a client's original clan tag unaffected by sourcemod?
It won't be completely impossible to do, but I haven't yet seen a "very simple way" (e.g. a simple command) to get this information though:

Query "cl_clanid", if it returns number "4" for the Valve group, you can execute (for example via SteamWorks), a HTTP call to:

Code:
https://steamcommunity.com/gid/4
You will be re-routed to the right group URL based on the ID automatically (e.g. "/groups/VALVE").

Then you parse the HTML contents, where you see:

Code:
<div class="grouppage_header_name" style="">
				Valve				<span class="grouppage_header_abbrev" style="">[VALVᴱ]</span>
</div>
The contents of the <span> is the current "original" clan tag.

Explanation of "current": Based on my experience, it seems like either the game or the Steam client is caching some group values on start, so if you have changed your group's clan tag at 11:09 CEST, but your client started the game on 11:08 CEST or before, that client may ship the wrong clan tag to the server (but correct cl_clanid), until the next time they start the game and/or the next time they log on to Steam, so there may be situations where it wouldn't be 100% exact, but that would assume a change has been made 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].

Last edited by DarkDeviL; 04-19-2018 at 05:12.
DarkDeviL is offline