Hallo,
i'm thinking about to add an age check on some of my plugin,
it could be usefull to warn a connected admin when a player with
a brand new steam account connects to the server or to restrict
such players to connect to the server.
as you probably know for old games like cs 1.6 such brand new
accounts are almost used by cheaters. an other point would be
to have a senior server only.
however, my tought to detect such accounts was to use the steam id
and to calculate the steamcommunity id out of it.
you can read more about it here:
http://forums.alliedmods.net/showthread.php?t=60899
as you probably know, when you create a new steam account you
getting a new sequential community id. this id rises with each new account.
for that reason it is possible to have one community id from a specific
date and to check each player and his steam id against it.
so it is easy to say if a steam account is younger/older then that date.
how to calculate the community out of a steamid (pseudo code):
SteamID:= 'STEAM_0:1:123456'
SteamID:= delete 'Steam_0:' from SteamID
SteamID:= '1:123456' //result
FirstNumber:= copy everything before : of SteamID
FirstNumber:= '1'; //result
SecondNumber:= copy everything behind : of SteamID
SecondNumber:= '123456' //result
SecondNumber:= SecondNumber * 2
SecondNumber:= FirstNumber + SecondNumber
SecondNumber:= SecondNumber + 76561197960265728;
SecondNumber contains the CommunityID now, however,
i think the last step can be skipped. Because amxx don't supports
Int64 so we can't operate with this value.
Finally we choosing an other CommunityID from a specfic date
and subtract 76561197960265728. Now we can compare this
number with any SteamID if the account is younger or older.
Hopefully someone can help me to translate this into amxx code.
I'm not such advanced in the amxx syntax.
__________________