Created
August 27, 2017 12:20
-
-
Save nosoop/1ef092634952dc93942000d05355b30f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stock int ConvertSteamID64ToAccountID(const char[] steamid64) { | |
static KeyValues s_Converter; | |
if (!s_Converter) { | |
s_Converter = new KeyValues("steamid_conv"); | |
} | |
int steamid[2]; | |
s_Converter.SetString("steamid", steamid64); | |
s_Converter.GetUInt64("steamid", steamid); | |
return steamid[0]; | |
} | |
stock void ConvertAccountIDToSteamID64(int steamid3, char[] buffer, int maxlen) { | |
static KeyValues s_Converter; | |
if (!s_Converter) { | |
s_Converter = new KeyValues("steamid_conv"); | |
} | |
int steamid[2]; | |
steamid[0] = steamid3; | |
steamid[1] = 0x1100001; | |
s_Converter.SetUInt64("steamid", steamid); | |
s_Converter.GetString("steamid", buffer, maxlen); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment