View Single Post
WaLLy3K
Junior Member
Join Date: May 2008
Location: Queensland, Australia.
Old 02-16-2009 , 22:06   Re: Convert STEAMID to Steam Community ID
Reply With Quote #129

Quote:
Originally Posted by siosios View Post
im thinking about adding some code so it reads the xml and pulls back info for <vacBanned>0</vacBanned> and displays whether this player has ever been vac banned on another engine, kinda like the plugin listed over in the approved section.

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

just thinking out loud

sio
http://files.w3k.mbpv.org/demos/sid_convert.php

Quote:
Originally Posted by 8088 View Post
]As far as I know a SteamID is a unique ID to identify a Steam user, regardless the games he/she has installed. If I play Counter-Strike 1.6 I have the exact same SteamID as when I play Left 4 Dead. Also, I don't see what this has to do with this script.
He's saying in other words that a FID for STEAM_0:1:2188497 will return the same FID as STEAM_1:1:2188497 and if there's anyone that's corrected this script breaking error. The problem is that sID to fID has a hardcoded 0 - at least in the php version in this thread and it's a problem with logged DB's that already have _0: recorded.

This is a very crap hack, but right now it's working with a couple of ID's I'm testing it on:

PHP Code:
    function fID2sID($id64)
    {
        
$id bcsub($id64'76561197960265728');
        if(
bcmod(bcdiv($id642), 3) == 0) { $auth1 0; }else{ $auth1 1; }
        if(
bcmod($id642) == 0) { $auth2 0; }else{ $auth2 1; }
        return 
"STEAM_".$auth1.":".$auth2.":".bcdiv($id2);
    } 
*Edit: Scratch that, I didn't test it enough before heading off to work.
__________________


Last edited by WaLLy3K; 02-17-2009 at 07:34.
WaLLy3K is offline
Send a message via MSN to WaLLy3K