AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   [EXTENSION] CSteamID - SteamIDs as 64bit integers (https://forums.alliedmods.net/showthread.php?t=86019)

Afronanny 04-18-2010 18:31

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
Quote:

Originally Posted by Powerlord (Post 1153724)
Note: I haven't tried this code, I was just examining the sourcecode.

Maybe I'm missing something, but the source code for one of the conversions seems to be off.

More specifically, in SteamIDToCSteamID you add 76561197960265728 to the number in the Steam ID to get a steamcommunity ID.

However, CSteamIDToSteamID does not subtract this number from the steamcommunity ID you pass in before being displayed.


Code:

    //-----------------------------------------------------------------------------
    // Purpose: Converts steam ID to its 64-bit representation
    // Output : 64-bit representation of a Steam ID
    //-----------------------------------------------------------------------------
    uint64 ConvertToUint64() const
    {
        return (uint64) ( ( ( (uint64) m_EUniverse ) << 56 ) + ( ( (uint64) m_EAccountType ) << 52 ) +
            ( ( (uint64) m_unAccountInstance ) << 32 ) + m_unAccountID );
    }

The answer is in steamclientpublic.h

berni 06-01-2010 06:28

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
Any progress on this ? I need it for the ep1 engine.

voogru 06-01-2010 10:10

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
Quote:

Originally Posted by berni (Post 1196863)
Any progress on this ? I need it for the ep1 engine.

http://forums.alliedmods.net/showthread.php?t=60899

That's the best you'll get because EP1 engine doesn't have the GetClientSteamID()

berni 06-01-2010 16:10

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
Quote:

Originally Posted by voogru (Post 1197028)
http://forums.alliedmods.net/showthread.php?t=60899

That's the best you'll get because EP1 engine doesn't have the GetClientSteamID()

I know that thread Voogru, but I only found a one way implementation for sourcemod but I want to do it 2 ways, and using 32bit integers for calculation is a bit dirty, isn't it ?

And bl4nk stated he is going to make this work for all other mods also...
you can ge the SteamID for every engine.

egor1908 06-01-2010 17:17

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
I'm not blaming your work, i think it's great, but whan can this be used for? For gaining faster acces for someone's ID page?

asherkin 06-01-2010 21:04

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
It's more reliable, i.e. a CSteamID won't break with trivial changes to the display format used (STEAM_1 instead of STEAM_0 for example).

voogru 06-02-2010 12:33

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
Quote:

Originally Posted by asherkin (Post 1197593)
It's more reliable, i.e. a CSteamID won't break with trivial changes to the display format used (STEAM_1 instead of STEAM_0 for example).

I think it's a matter of time before the STEAM_ mask goes away completely. It probably won't be until the next iteration of their engine though which they are probably secretly working on.

So using the 64 bit numbers may not be useful for the plug-ins (because a new engine will by default, break all of the plug-ins), but for stuff that resides in MySQL databases and on websites it will make that stuff immune to the changes.

egor1908 06-04-2010 07:15

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
Quote:

Originally Posted by asherkin (Post 1197593)
It's more reliable, i.e. a CSteamID won't break with trivial changes to the display format used (STEAM_1 instead of STEAM_0 for example).

Isnt the first number depending on if you are online or not? That's what i have observed.

voogru 06-04-2010 11:35

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
Quote:

Originally Posted by egor1908 (Post 1199468)
Isnt the first number depending on if you are online or not? That's what i have observed.

no.

pheadxdll 06-11-2010 23:42

Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
 
Just click one more time to download here.


All times are GMT -4. The time now is 12:10.

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