PDA

View Full Version : [IDEA] Allow people on server Only with Avatars


Splifer
12-21-2011, 10:12
First: Sorry for my English :P

I don't know whether it is possible.
I think about plugin which will let people to enter into server if they have setted Avatar.

Not this, basic avatar: http://media.steampowered.com/steamcommunity/public/images/avatars/fe/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb.jpg

Player must have His own avatar to enter on server.

Is it possible? What do you think?

asherkin
12-21-2011, 12:24
The only possible implementation of this would be terrible.

Zephyrus
12-21-2011, 13:33
most of the times avatars dont even work...at least not in css

McFlurry
12-21-2011, 16:29
It seems all you would need to do once you get a users 64 bit steam, is check that the avatar matches the default steam avatar url after converting their steam id page into xml with ?xml=true. I don't know if this is the method asherkin is talking about.

Avaray
12-21-2011, 16:46
So, how works plugin for checking F2P players? Isn't similar process?

McFlurry
12-21-2011, 16:50
That's a steam tools thing. Have a look here. (https://forums.alliedmods.net/showthread.php?t=160049)

asherkin
12-21-2011, 19:29
I don't know if this is the method asherkin is talking about.
Yes.

So, how works plugin for checking F2P players? Isn't similar process?
No, avatars are never sent to the server.

Russianeer
12-23-2011, 22:52
Well, you can get the link of the avatar using their steam id, but in order to compare the default steam avatar with theirs, you'd need some pixel comparing method.

So yes, I guess this is possible, but I don't see why would anyone ever do this.

Dr. McKay
12-25-2011, 10:32
Someone could write a PHP scrip that checks the avatar and returns true or false, then call that with cURL, Sockets, or SteamTools.

Zephyrus
12-25-2011, 13:06
Someone could write a PHP scrip that checks the avatar and returns true or false, then call that with cURL, Sockets, or SteamTools.


<?php
$xml = file_get_contents("https://steamcommunity.com/profiles/".$_GET["communityid"]."/?xml=1");

if(preg_match("/\<avatarIcon\>\<\!\[CDATA\[(.*)\]\]\>\<\/avatarIcon\>/i", $xml, $avatar))
$avatar = $avatar[1];
else
die("There was a problem getting the profile data.");

$avatar_blob = file_get_contents($avatar);

if(md5($avatar_blob)=="3f242a505d7de8f8317edfac08e38d5d")
echo 1;
else
echo 0;
?>
for all you sick bastards out there

xyz.php?communityid=<steamid64>

it either returns 0 or 1

edit: but i think a better method would be to use this from opensteamworks:

IClientFriends::GetSmallFriendAvatar( CSteamID steamIDFriend );
ISteamFriends::GetSmallFriendAvatar( CSteamID steamIDFriend );Both returns 1 if theres no avatar set, but im not sure whether they are exposed to the game server.

edit2: nope, they are not.