View Single Post
nomy
Senior Member
Join Date: Dec 2009
Location: United Kingdom
Old 09-20-2015 , 01:22   Re: All Admin functions ceased working after today's update (8-21)
Reply With Quote #222

Quote:
Originally Posted by nineteeneleven View Post
PHP function to convert STEAM_X:X:XXXXXXX to new ids.

Code:
function steam3($steam2) {
        $id = explode(':', $steam2);
        $id3 = ($id[2] * 2) + $id[1];
        return '[U:1:' . $id3 . ']';
    }
Do you have function to do it the other way around? Steam3 to Steam2?

Edit: Nevermind, managed to make one

Code:
function steam2($steam3) {
    $id = explode(':', $steam3);
    $modulus = $id[2] % 2;
    $id2 = ($id[2] - $modulus) / 2;
    return 'STEAM_0:' . $modulus . ':' . $id2;
}

Last edited by nomy; 09-20-2015 at 04:16.
nomy is offline