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

Help with Steam WEB API


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
brhvitor6
Member
Join Date: Oct 2012
Old 10-21-2013 , 03:59   Help with Steam WEB API
Reply With Quote #1

Hello every one, i'm trying to retrive the steam id like this: STEAM_0:0:50119518 but steam's web api just retuns this: 76561197960287930 (64bit steam id). someone know how i can retun the "simple" steam id from the web api?
brhvitor6 is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 10-21-2013 , 15:22   Re: Help with Steam WEB API
Reply With Quote #3

Quote:
Originally Posted by brhvitor6 View Post
Hello every one, i'm trying to retrive the steam id like this: STEAM_0:0:50119518 but steam's web api just retuns this: 76561197960287930 (64bit steam id). someone know how i can retun the "simple" steam id from the web api?
Given W=76561197960287930 and STEAM_X:Y:Z:
  • Subtract 76561197960265728 from W and assign. e.g. W = W - 76561197960265728 = 76561197960287930 - 76561197960265728 = 22202
  • Y = W Mod 2. e.g. Y = 22202 Mod 2 = 0
  • Z = (W - Y) / 2. e.g. Z = (22202 - 0) / 2 = 11101
  • X is the universe, and depends on the game. SourceMod doesn't look at this part of the SteamID so it doesn't matter what you assign here, zero or one is typical. e.g. X = 0.

So here, the SteamID is STEAM_0:0:11101, Gabe Newell's SteamID, as confirmed by an online converter here.
__________________

Last edited by 11530; 10-21-2013 at 15:25.
11530 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 02:07.


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