Hello!
I hope, this is not a dumb question, but is there any website, where are all commands for sv_loadingurl are written down? I read this [url]http://wiki.garrysmod.com/?title=Sv_loadingurl[/url], but I tought, there are some more commands, like "$_GET["steamNAME"], $_GET["serverNAME"] and ServerIP, and some more stuff. If there are, could you send me the link(s)? If no, please don't cut my head off.
Thank you!
-Hammond
PS.: Im not so good in PhP, yet.
[highlight](User was banned for this post ("Wrong section" - mahalis))[/highlight]
There's %s for players steamid and %m for the mapname.
From the community id you can get all sorts of information. Using this class you can retrieve loads of details on the player.
[code]
class Steam
{
public static function GetFriendID($authid)
{
return '7656'.(((substr($authid, 10)) * 2) + 1197960265728 + (substr($authid, 8, 1)));
}
public static function GetAuthID($i64friendID)
{
$tmpfriendID = $i64friendID;
$iServer = "1";
if(bcmod($i64friendID, "2") == "0")
{
$iServer = "0";
}
$tmpfriendID = bcsub($tmpfriendID,$iServer);
if(bccomp("76561197960265728",$tmpfriendID) == -1)
$tmpfriendID = bcsub($tmpfriendID,"76561197960265728");
$tmpfriendID = floor(bcdiv($tmpfriendID, "2"));
return ("STEAM_0:" . $iServer . ":" . $tmpfriendID);
}
}
[/code]
[code]
$steamid = Steam::GetAuthID($_GET["communityid"]);
// maybe do something in your SQL database?
$url = 'http://steamcommunity.com/profiles/' . $_GET["communityid"] . '?xml=1';
$url = file_get_contents($url);
if(strlen($url) < 5) { redirectexit(''); }
$xml = simplexml_load_string($url);
if(strlen($xml) < 5 || $xml->steamID64 == '0') { redirectexit(''); }
echo "Player Name: " . $xml->steamID;
echo "Avatar URL: " . $xml->avatarFull;
[/code]
Nevermind, thanks
[QUOTE=ThatLuaCoder;30085879]From the community id you can get all sorts of information. Using this class you can retrieve loads of details on the player.
[code]
class Steam
{
public static function GetFriendID($authid)
{
return '7656'.(((substr($authid, 10)) * 2) + 1197960265728 + (substr($authid, 8, 1)));
}
public static function GetAuthID($i64friendID)
{
$tmpfriendID = $i64friendID;
$iServer = "1";
if(bcmod($i64friendID, "2") == "0")
{
$iServer = "0";
}
$tmpfriendID = bcsub($tmpfriendID,$iServer);
if(bccomp("76561197960265728",$tmpfriendID) == -1)
$tmpfriendID = bcsub($tmpfriendID,"76561197960265728");
$tmpfriendID = floor(bcdiv($tmpfriendID, "2"));
return ("STEAM_0:" . $iServer . ":" . $tmpfriendID);
}
}
[/code]
[code]
$steamid = Steam::GetAuthID($_GET["communityid"]);
// maybe do something in your SQL database?
$url = 'http://steamcommunity.com/profiles/' . $_GET["communityid"] . '?xml=1';
$url = file_get_contents($url);
if(strlen($url) < 5) { redirectexit(''); }
$xml = simplexml_load_string($url);
if(strlen($xml) < 5 || $xml->steamID64 == '0') { redirectexit(''); }
echo "Player Name: " . $xml->steamID;
echo "Avatar URL: " . $xml->avatarFull;
[/code][/QUOTE]
Thank you very much, this code ( and one of my friend) helped me to understand this whole stuff, and now I have lot of "Styled samples" from you.
I really thank you a lot for this, and sorry for my last dumb reply. =^)
Sorry, you need to Log In to post a reply to this thread.