Raised This Month: $51 Target: $400
 12% 

GetSteamAccountID vs GetClientAuthId


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-29-2018 , 03:16   GetSteamAccountID vs GetClientAuthId
Reply With Quote #1

Hi,

1) what is a preffered way to unique identify licensed and pirated steam accounts?
2) what is the difference between all of the options below? Some of them deprecated or out of date? Can some of them return null in special circumstances?

Code:
	int iSteamId = GetSteamAccountID(client);
	PrintToChat(client, "GetSteamAccountID = %i", iSteamId);
	
	char sId[50];
	GetClientAuthId(client, AuthId_Engine, sId, sizeof(sId));
	PrintToChat(client, "AuthId_Engine = %s", sId);
	
	GetClientAuthId(client, AuthId_Steam2, sId, sizeof(sId));
	PrintToChat(client, "AuthId_Steam2 = %s", sId);
	
	GetClientAuthId(client, AuthId_Steam3, sId, sizeof(sId));
	PrintToChat(client, "AuthId_Steam3 = %s", sId);
	
	GetClientAuthId(client, AuthId_SteamID64, sId, sizeof(sId));
	PrintToChat(client, "AuthId_SteamID64 = %s", sId);
Quote:
GetSteamAccountID = 4502XXXX
AuthId_Engine = STEAM_1:1:2251XXXX
AuthId_Steam2 = STEAM_1:1:2251XXXX
AuthId_Steam3 = [U:1:4502XXXX]
AuthId_SteamID64 = 765611980XXXXXXXX
I found this article about SteamId formats. But not too many words about purpose.

Thanks.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 10-29-2018 at 03:17.
Dragokas is offline
Ermert1992
Member
Join Date: Jan 2012
Location: Germany
Old 10-29-2018 , 03:26   Re: GetSteamAccountID vs GetClientAuthId
Reply With Quote #2

Maybe this forum post helps you:

https://forums.alliedmods.net/archiv.../t-272104.html
__________________
Mfg Jonas


Ermert1992 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-29-2018 , 09:26   Re: GetSteamAccountID vs GetClientAuthId
Reply With Quote #3

Thank you, Ermert1992.

And what is actually mean:

https://sm.alliedmods.net/new-api/cl...etClientAuthId
Quote:
Originally Posted by wiki
bool validate
Check backend validation status. DO NOT PASS FALSE UNLESS YOU UNDERSTAND THE CONSEQUENCES, You WILL KNOW if you need to use this, MOST WILL NOT.
And what is a default value of "validate" argument? I guess, it's "true".
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 10-29-2018 at 09:27.
Dragokas is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-29-2018 , 10:40   Re: GetSteamAccountID vs GetClientAuthId
Reply With Quote #4

Quote:
Originally Posted by Dragokas View Post
Thank you, Ermert1992.

And what is actually mean:

https://sm.alliedmods.net/new-api/cl...etClientAuthId

And what is a default value of "validate" argument? I guess, it's "true".
PHP Code:
/**
 * Retrieves a client's authentication string (SteamID).
 *
 * @param client        Player index.
 * @param authType        Auth id type and format to use.
 * @param auth            Buffer to store the client's auth id.
 * @param maxlen        Maximum length of string buffer (includes NULL terminator).
 * @param validate        Check backend validation status.
 *                 DO NOT PASS FALSE UNLESS YOU UNDERSTAND THE CONSEQUENCES,
 *                    You WILL KNOW if you need to use this, MOST WILL NOT.
 * @return                True on success, false otherwise.
 * @error                If the client is not connected or the index is invalid.
 */
native bool GetClientAuthId(int clientAuthIdType authTypechar[] authint maxlenbool validate=true); 
__________________
Do not Private Message @me
Bacardi is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-31-2018 , 17:56   Re: GetSteamAccountID vs GetClientAuthId
Reply With Quote #5

Quote:
Originally Posted by Dragokas View Post
And what is actually mean:
https://github.com/alliedmodders/sou....cfg#L111-L117
__________________
asherkin is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-14-2020 , 11:09   Re: GetSteamAccountID vs GetClientAuthId
Reply With Quote #6

What is actually a difference between AuthId_Engine and AuthId_Steam2 ?

Isn't AuthId_Engine more preferred since AuthId_Steam2 can return "STEAM_ID_PENDING" as stated in article?
or it is just an alias if game internally uses same auth method...

https://sm.alliedmods.net/new-api/clients/AuthIdType
Quote:
Originally Posted by wiki
Note that for the Steam2 and Steam3 types, the following ids are also valid values: "STEAM_ID_PENDING" - Authentication is pending. "STEAM_ID_LAN" - Authentication is disabled because of being on a LAN server. "BOT" - The client is a bot.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-14-2020 , 11:24   Re: GetSteamAccountID vs GetClientAuthId
Reply With Quote #7

AuthId_Engine is the raw string value returned by the engine, it can be anything (most games use either the Steam2 or Steam3 rendered formats, but it can also be one of those special strings).

The other AuthId types are generated by SM from the plain account ID so are guaranteed to be consistent.
__________________
asherkin is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-14-2020 , 11:30   Re: GetSteamAccountID vs GetClientAuthId
Reply With Quote #8

I see, thanks for an explanation.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas 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:46.


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