Can someone help me with Assault Cube Entity List
Archiviert a year ago
B
__cdecl
I'm trying to make a entity list in assault cube but my program is not working correctly
```cpp
#include "mem.h"
#include "offsets.h"
#include <stdio.h>
const DWORD PID = GetProcID(L"ac_client.exe");
const uintptr_t baseAddress = GetModuleBaseAddress(PID, L"ac_client.exe");
int main()
{
int playersInGame = 4;
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);
auto addresslocalplay = readAddress<uintptr_t>(hProcess, baseAddress + offsets::localplayer);
player localplay = readAddress<player>(hProcess, addresslocalplay);
auto EntityListAddress = readAddress<uintptr_t>(hProcess, baseAddress + offsets::entitylist);
for (int i = 0; i < 4; i++)
{
auto entity = readAddress<player>(hProcess, EntityListAddress + (i * 4));
printf("Player %d = %d\n", i, entity.health);
}
printf("%d\n", localplay.health);
}
```
localplayer works correctly but not entity list
```cpp
#pragma once
#include "structs.h"
namespace offsets
{
constexpr uint32_t localplayer = 0x17E254;
constexpr uint32_t entitylist = 0x18AC04;
}
```
Offsets
```cpp
class player
{
public:
char pad_0000[236]; //0x0000
uint32_t health; //0x00EC
char pad_00F0[1872]; //0x00F0
}; //Size: 0x0840
static_assert(sizeof(player) == 0x840);
```
player struct
