just started working on cf again after not touching it since 2018 after converting stuff to x64 i seem to be crashing when accessing player classes
my GameClientShell class with how im getting players and local player
currently this is for CFWest
pointer
Code:
DWORD_PTR GetBaseAdress(const char* ModuleName)
{
return (DWORD_PTR)pProxyCallClass->GetModuleHandleA(ModuleName);
}
Code:
pClientShellBase = (cCLientShellHolder*)(GetBaseAddress(XorString("CShell_x64.dll")) + 0x1F3DB40);
Code:
class cCLientShellHolder
{
public:
class cClientShellBase* pClientShell; //0x0000
}; //Size: 0x0080
class cClientShellBase
{
public:
char pad_0000[144]; //0x0000
class cLocalEntity* pLocalEnt; //0x0090
inline CPlayer* GetPlayerByIndex(int64_t index) {
return reinterpret_cast<CPlayer*>((uintptr_t)this + 0x298 + (index * 0xD98));
}
inline CPlayer* GetLocalPlayer() {
return GetPlayerByIndex((uintptr_t)this + 0x289);
}
how im accessing i crash when i get ingame and it goes to draw my health on the screen
Code:
auto LocalPlayer = pFunctions->GetLocalPlayer();
if (LocalPlayer != 0)
{
sprintf(buffertext, "LocalPlayer:Health:%i", LocalPlayer->health);///LocalPlayer->Health = CPlayer + 0x004C
pGUI->DrawTextOutlined(ImVec2(50, 50), buffertext, ImColor(255, 0, 0));
}
if someone can help with this since ive been away from cf so long it would be a huge help thanks