Page 1 of 1

[Q] SteamID mismatch

Posted: Wed Apr 08, 2020 1:38 am
by Sam

Syntax: Select all

from players.entity import Player
pl = Player(1) # STEAM_0:0:176325977
pl.raw_steamid.to_steamid2() # STEAM_1:0:176325977


It is right?

Re: [Q] SteamID mismatch

Posted: Wed Apr 08, 2020 1:34 pm
by L'In20Cible
That number is the Steam Universe. Every games supported by SP will correctly returns 1, some old games that run on older engines will returns 0 but that was a bug that was fixed and unified since at least most HL2's based game got ported over to OB.

Re: [Q] SteamID mismatch

Posted: Wed Apr 08, 2020 3:09 pm
by Sam
Maybe there is some unique player identifier? In tf2 and l4d2 SteamID64 do not match

Re: [Q] SteamID mismatch

Posted: Wed Apr 08, 2020 3:19 pm
by L'In20Cible
Sam wrote:Maybe there is some unique player identifier? In tf2 and l4d2 SteamID64 do not match

The steamid64 should be consistent, why do you think they aren't? And why not simply using pl.steamid, or pl.uniqueid for that matter? What exactly are you trying to do?

Re: [Q] SteamID mismatch

Posted: Thu Apr 09, 2020 12:58 pm
by Sam
L'In20Cible wrote:
Sam wrote:Maybe there is some unique player identifier? In tf2 and l4d2 SteamID64 do not match

The steamid64 should be consistent, why do you think they aren't? And why not simply using pl.steamid, or pl.uniqueid for that matter? What exactly are you trying to do?


A very long time ago I was going to make a plugin exclusively for one person on all servers. If `.steamid` in TF2 worked fine, then in L4D2 it did not work and I had to use `.raw_steamid` (`.uniqueid` is not good for me and my projects)

Maybe a lot of time has passed and everything has changed. I'll check `.steamid` later (Quarantine spoils everything >:c)

Re: [Q] SteamID mismatch

Posted: Thu Apr 09, 2020 1:23 pm
by L'In20Cible
Player.steamid can be either steamid2 or steamid3 depending of the game. However, they should be consistent across all games. For example, Player.raw_steamid.to_steamid2() should be the same everywhere, same as to_steamid3(), or to_uint64(). If you want to be able to determine if a player matches a specific format across any games, then just pick a format and be consistent in how your authenticate the player. I would recommend steamid64, because they are the link to your profile (e.g steamcommunity.com/profiles/<steamid64>).