Konwersja SteamID na FriendsID

Od HLDS.pl
Skocz do: nawigacji, wyszukiwania

Zaczerpnięte z HLStatsX

function GetFriendID($pszAuthID)
{
 
    $iServer = "0";
    $iAuthID = "0";
 
    $szAuthID = $pszAuthID;
 
    $szTmp = strtok($szAuthID, ":");
 
    while(($szTmp = strtok(":")) !== false)
    {
        $szTmp2 = strtok(":");
        if($szTmp2 !== false)
        {
            $iServer = $szTmp;
            $iAuthID = $szTmp2;
        }
    }
    if($iAuthID == "0")
        return "0";
 
    $i64friendID = bcmul($iAuthID, "2");
 
    //Friend ID's with even numbers are the 0 auth server.
    //Friend ID's with odd numbers are the 1 auth server.
    $i64friendID = bcadd($i64friendID, bcadd("76561197960265728", $iServer));
 
    return $i64friendID;
}
Osobiste
Przestrzenie nazw
Warianty
Działania
HLDS.pl - Menu:
Inne
IRC
Inne sekcje:
Znajomi:
Narzędzia