New Hook CheckPassword returning Steam COMUNNITY ID

New Hook CheckPassword returning Steam Community ID (SteamID64)

So, I need the Normal Steam ID you know STEAM_ID:X:XXXXXXXXXX not 12315616171712.

So anyway to convert SteamID64 into SteamID normal using LUA?



function SteamID64ToSteamID(id)
    local tests = "7656119"
    if string.sub(id, 1, #tests) != tests then
		return "UNKNOWN"
    end
    
    local newid = tonumber(string.sub(id, 8))
    local a = newid - 7960265728
    local b = a / 2
    local c = a % 2 == 0 and 0 or 1
    
    return "STEAM_0:" .. c .. ":" .. math.floor(b)
end


Just saying that you can use ply:SteamID64() to compare the community ID.

And how i will do that if the ChangePassword hook is called when the player is connecting, in other words the “PLY” do not exists until the player spawn.