#define cPedpPoolStart 0xB7CD98
#define cPedpLocalPlayer 0xB6F5F0
#define cPedPoolMaximumNumber 0xB74498
#define OFFSET_HEALTH 0x540
#define OFFSET_MATRIX 0x14
#define OFFSET_POS_X 0x30
#define OFFSET_POS_Y 0x34
#define OFFSET_POS_Z 0x38
// EXAMPLE: set cPed [ID = 2]'s health to 0
*(float*)(*(DWORD*)(cPedpPoolStart + 2*4) + OFFSET_HEALTH) = 0;
void SetPlayerhealth(unsigned short cPedPoolID, float health)
{
*(float*)(*(DWORD*)(cPedpPoolStart + cPedPoolID*4) + OFFSET_HEALTH) = health;
}
void TeleportALLPedsToMe(unsigned short cPedPoolID)
{
DWORD myCped = *(DWORD*)cPedpLocalPlayer;
DWORD myMatrix = *(DWORD*)(myCped + 0x14);
float MyPosition[3];
MyPosition[0] = *(float*)(myMatrix + OFFSET_POS_X)
MyPosition[1] = *(float*)(myMatrix + OFFSET_POS_Y)
MyPosition[2] = *(float*)(myMatrix + OFFSET_POS_Z)
for (int i = 0; i < *(int*)cPedPoolMaximumNumber ; i++)
{
if(*(DWORD*)(cPedpPoolStart + i * 0x4) == NULL)
{
return;
}
*(float*)( (*(DWORD*)(*(DWORD*)(cPedpPoolStart + i * 0x4) + 0x14) + OFFSET_POS_X) = MyPosition[0]
*(float*)( (*(DWORD*)(*(DWORD*)(cPedpPoolStart + i * 0x4) + 0x14) + OFFSET_POS_Y) = MyPosition[1]
*(float*)( (*(DWORD*)(*(DWORD*)(cPedpPoolStart + i * 0x4) + 0x14) + OFFSET_POS_Z) = MyPosition[2]
}
void SetPlayerhealth(unsigned short cPedPoolID, float health)
{
*(float*)(*(DWORD*)(cPedpPoolStart + cPedPoolID * 4) + OFFSET_HEALTH) = health;
}
for (int i = 0; i < 200; i++)
SetPlayerhealth(i, 0);
SetPlayerhealth(2, 0);
#define cPedpPoolStart 0xB7CD98 //Leave out if already defined
#define cPedPoolMaximumNumber 0xB74498 //
#define OFFSET_HEALTH 0x540 //
for (int i = 0; i < *(int*)cPedPoolMaximumNumber ; i++)
{
if(*(DWORD*)(cPedpPoolStart + i * 0x4) == NULL)
{
return;
}
SetPlayerhealth(i, 0.0);
}
1337 link said:doesnt work only i die
yesmrT101 link said:post all of the code here from your .cpp
you are creating an asi, yes?
Includes and defines here
void InitHack(void);
DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)InitHack, 0, 0, 0);
break;
}
return 1;
}
void SetPlayerhealth(unsigned short cPedPoolID, float health)
{
*(float*)(*(DWORD*)(cPedpPoolStart + cPedPoolID * 4) + OFFSET_HEALTH) = health;
}
void InitHack(void)
{
while (1)
{
for (int i = 1; i < *(int*)cPedPoolMaximumNumber; i++)
{
if (*(DWORD*)(cPedpPoolStart + i * 0x4) == NULL)
{
return;
}
SetPlayerhealth(i, 0.0);
}
Sleep(1);
}
}
Includes and defines here
void InitHack();
DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)InitHack, 0, 0, 0);
break;
}
return 1;
}
void SetPlayerhealth(unsigned short cPedPoolID, float health)
{
*(float*)(*(DWORD*)(cPedpPoolStart + cPedPoolID * 4) + OFFSET_HEALTH) = health;
}
void InitHack()
{
while (1)
{
if(GetAsyncKeyState(VK_NUMPAD9)) //check for keypress numpad9
{
for (int i = 0; i < *(int*)cPedPoolMaximumNumber; i++)
{
if (*(DWORD*)(cPedpPoolStart + i * 0x4) == NULL){}
else{ SetPlayerhealth(i, 0.0);}
}
Sleep(200);
}
Sleep(10);
}
}
wait, maybe my code is wrong...1337 link said:![]()
here the function(PedPool) + debug info...
the position is always the same
[member=5679]T3K[/member]
[member=10256]mrT101[/member]