You can get the Steam install path with the SteamAPI_GetSteamInstallPath() command defined in steam_api.h.
Then you can read the file and extract the account name out of it.
Getting the player name is really easy:
In isteamfriends.h you'll should find this method:
// returns the local players name - guaranteed to not be NULL.
// this is the same name as on the users community profile page
// this is stored in UTF-8 format
// like all the other interface functions that return a char *, it's important that this pointer is not saved
// off; it will eventually be free'd or re-allocated
virtual const char *GetPersonaName() = 0;
So SteamFriends.GetPersonaName() should give you the player name.
Asked in February 2016Viewed 2,189 timesVoted 13Answered 1 times