Konwersja SteamID na FriendsID

Od HLDS.pl
(Różnice między wersjami)
Skocz do: nawigacji, wyszukiwania
(+Kat.)
 
Linia 1: Linia 1:
Zaczerpniete z hlstatsX
+
Zaczerpnięte z HLStatsX
 
+
 
<phpgeshi>
 
<phpgeshi>
  
Linia 33: Linia 32:
 
     return $i64friendID;
 
     return $i64friendID;
 
}
 
}
 
 
</phpgeshi>
 
</phpgeshi>
 +
 +
[[Kategoria:Steam]]

Aktualna wersja na dzień 15:00, 20 paź 2008

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