Just add this code after pfnCreateFakeClient() call (after bot entity created):
Code:
const unsigned int k_unSteamUserDesktopInstance = 1;
// Steam account types
enum EAccountType
{
// ...
k_EAccountTypeIndividual = 1 // single user account
// ...
};
// Steam universes. Each universe is a self-contained Steam instance.
enum EUniverse
{
// ...
k_EUniversePublic = 1
// ...
};
#pragma warning (push)
#pragma warning (disable: 4201) // nameless union is nonstandard
// 64 bits total
union SteamID_t // From CSteamID class....
{
struct /* Unnamed */
{
unsigned int m_unAccountID : 32; // unique account identifier
unsigned int m_unAccountInstance : 20; // dynamic instance ID (used for multiseat type accounts only)
unsigned int m_EAccountType : 4; // type of account - can't show as EAccountType, due to signed / unsigned difference
EUniverse m_EUniverse : 8; // universe this account belongs to
};
unsigned long long m_unAll64Bits;
} steamID;
#pragma warning (pop) // no more anonymous unions until next time
const unsigned int SteamAccountIDMaximum (2039734271u);
steamID.m_unAccountID = 32118129u; // My ID (for example)//RANDOM_LONG (0u, SteamAccountIDMaximum); - random almost never works....
steamID.m_unAccountInstance = k_unSteamUserDesktopInstance; // constant
steamID.m_EAccountType = k_EAccountTypeIndividual; // constant
steamID.m_EUniverse = k_EUniversePublic; // constant
// or steamID.m_unAll64Bits = 76561197992383857ull; // My ID (full ID must have the form 7656119XXXXXXXXXX)
SET_CLIENT_KEYVALUE (botEntityIndex, GET_INFOKEYBUFFER (botEdict), "*sid", FormatBuffer ("%I64u", steamID.m_unAll64Bits));