• Status on sv_loadingurl?
    2 replies, posted
Hello. Sometimes I join some servers and this servers send me my Steam picture with some information about me. How can I do that? It's a custom addon?
You can utilise the steam web API to obtain and display a users avatar image Developers usually use PHP for this activity as it can keep your steam apikey private [URL="https://developer.valvesoftware.com/wiki/Steam_Web_API#GetPlayerSummaries_.28v0002.29"]docs[/URL] using this code in a php document would allow use of the steam api [code]<?php $SteamAPIKey = ""; if (!isset($_GET["steamid"])) { die("Woops, you don't seem to be using the correct loading URL format, please make sure it has the correct extension it should look like this: www.yourdomain.com/loading/index.php?steamid=%s"); } $steamid64 = $_GET["steamid"]; $url = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=" . $SteamAPIKey . "&steamids=" . $steamid64; $json = file_get_contents($url); $table2 = json_decode($json, true); $table = $table2["response"]["players"][0]; ?>[/code] then, an image can be impelemted with [code]<img src="<?php echo $arr['response']['players'][0]['avatar']?>"/>[/code] [B]More [URL="http://wiki.garrysmod.com/page/Loading_URL"]Docs[/URL][/B]
Oh, It's harder than I thought. =/ Thank You man
Sorry, you need to Log In to post a reply to this thread.