-
Автор темы
- #1
Сливаю так как не нашел особое применение к чему либо
Как можно использовать:
C++:
class IGameframework
{
public:
IPlayerProfileManager* GetPlayerProfileManager()
{
return __Virtual<IPlayerProfileManager* (__thiscall*)(void*)>(this, 304)(this);
}
};
C++:
class IPlayerProfileManager
{
public:
struct SProfileDescription
{
const char* name;
time_t lastLoginTime;
SProfileDescription()
: name(nullptr)
, lastLoginTime(0)
{
}
};
int GetUserCount()
{
return __Virtual<int (__thiscall*)(void*)>(this, 32)(this);
}
bool GetProfileInfo(const char* userId, int index, IPlayerProfileManager::SProfileDescription& outInfo)
{
return __Virtual<int(__thiscall*)(void*, const char*, int, IPlayerProfileManager::SProfileDescription&)>(this, 40)(this, userId, index, outInfo);
}
const char* GetCurrentUser()
{
return __Virtual<const char*(__thiscall*)(void*)>(this, 48)(this);
}
bool RenameProfile(const char* userId, const char* newName, EProfileOperationResult& result)
{
return __Virtual<bool (__thiscall*)(void*, const char*, const char*, EProfileOperationResult&)>(this, 104)(this, userId, newName, result);
}
IPlayerProfile* GetCurrentProfile(const char* userId)
{
return __Virtual<IPlayerProfile* (__thiscall*)(void*, const char*)>(this, 152)(this, userId);
}
};
C++:
class IPlayerProfile
{
public:
const char* GetName()
{
return __Virtual<const char*(__thiscall*)(void*)>(this, 32)(this);
}
const char* GetUserId()
{
return __Virtual<const char*(__thiscall*)(void*)>(this, 40)(this);
}
IActionMap* GetActionMap(const char* name)
{
return __Virtual<IActionMap*(__thiscall*)(void*, const char*)>(this, 48)(this, name);
}
};
C++:
IPlayerProfileManager* pProfile = pGameFramework->GetPlayerProfileManager();
if (pProfile)
{
EProfileOperationResult result;
const char* szUserName = SSystemGlobalEnvironment::Singleton()->pSystem->GetCurUserName();
IPlayerProfile* m_PlayerProfile = pProfile->GetCurrentProfile(szUserName);
pProfile->RenameProfile(szUserName, __xorstr("FuckOFF"), result);
if (GetAsyncKeyState(VK_NUMPAD0) & 1)
{
MessageBoxA(0, m_PlayerProfile->GetName(), m_PlayerProfile->GetUserId(), MB_ICONINFORMATION);
}
}