View Single Post
Evil-Dragon
Junior Member
Join Date: Oct 2009
Old 11-13-2009 , 16:57   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #8

Will this help?

Code:
<?php function steam2friend($steam_id){
    $steam_id=strtolower($steam_id);
    if (substr($steam_id,0,7)=='steam_0') {
        $tmp=explode(':',$steam_id);
        if ((count($tmp)==3) && is_numeric($tmp[1]) && is_numeric($tmp[2])){
            return bcadd((($tmp[2]*2)+$tmp[1]),'76561197960265728');
        }else return false;
        }else{
            return false;
        }
    }  
?>
I used that in a bit of backend coding i found to translate steam_id's to community id's. You can see it in use here: http://www.evil-dragon.co.uk/itemlog/

It took me a while to get it working with my limited knowledge of php.

Also there appears to be a problem with the statistic "Intel Captured" it is recording one for every player on red/blu whenever someone else captures the intel.
__________________

Last edited by Evil-Dragon; 11-13-2009 at 17:24.
Evil-Dragon is offline