1. Post #1
    Gold Member
    0lenny0's Avatar
    March 2010
    450 Posts
    Does anybody know some code to check a steam id?
    I wan't to see if the steam id of a player is the same as the one i called listedsteamid.

    I have tryd these:
    steamid = CSteamID::GetAccountID();
    steamid = pPlayer->GetUserID();
    steamid = bool CBaseMultiplayerPlayer::GetSteamID( CSteamID *pID );
    steamid = steamapicontext->SteamUser()->GetSteamID().GetAccountID();
    steamid = uint64 CBaseMultiplayerPlayer::GetSteamIDAsUInt64( void );

    Some error's i got with these look like i didn't include the correct filles.
    Could anybody help me out with the code to check steamid's?

    Thanks in advance(just started on the source engine,not having any luck on the wiki)

  2. Post #2
    Sweet Roll Moderator
    Daimao's Avatar
    February 2007
    4,135 Posts
    If you're using the Scratch base I'd suggest you take a look at 'ClientScoreBoardDialog.cpp'.
    Reply With Quote Edit / Delete Reply Netherlands Show Events Late Late x 1 (list)

  3. Post #3
    Gold Member
    0lenny0's Avatar
    March 2010
    450 Posts
    Hmm ok i'll take a suick look into it.
    Seems like my project (2007 engine)doesn't have that file.
    Gonna look around in the 2006 engine.

    Can't find the file.
    Hope this is correct:

    this is the compile output when i trie this:

    1>.\client.cpp(1488) : error C2227: left of '->GetUserID' must point to class/struct/union/generic type
    1> type is ''unknown-type''

    Only error is the GetUserID

  4. Post #4
    OrYgin's Avatar
    November 2007
    691 Posts
    I am using
    in the client which works just fine (It's the Steam Community ID tough).
    Of course you need to add
    #include "steam\steam_api.h"

    For the server there's something like pPlayer->GetNetworkIDString()