SolvedUpgrade my hack

Posts 1–9 of 9 · Page 1 of 1
Upgrade my hack
Ok so i have managed to get my first hack up and running, Im trying to add enemy player count and i cant figure it out
so far i just have my location and and no grass etc.

Now i have reclass and can add pointers and classes to find my location ok, but how do i find the enemy and count them?
What do you mean by player count?
If you mean how many players are on the server, that can be done as follows:
Code:
const int networkManagerOffset = 0xFAC198;
int serverBase = this.Mem.ReadInt(networkManagerOffset + 0x28);
int playerCount = this.Mem.ReadInt(serverBase + 0x10);
Works like a dream Thanks a lot man +rep

What about in a 200M radius if i have my location already as pX pY pZ
Quote Originally Posted by boombeachcpt View Post
Works like a dream Thanks a lot man +rep

What about in a 200M radius if i have my location already as pX pY pZ
You can read the object table to do that.
Much like in @gtaplayer2 tutorial you will read the World, 0xFB1710.
Then the objectTable, Ptr and Size.
Code:
int objectTable = Mem.ReadInt(World + 0x768);
int objectTablePtr = Mem.ReadInt(objectTable + 0x0);
int objectTableSize = Mem.ReadInt(objectTable + 0x4);
Then just go through the table like in the aforementioned tutorial.
Code:
for (int i = 0; i <= objectTableSize; i++)
Next, you get the specific entity, each entity is 2C worth of bytes, so you iterate them.
Code:
int entity = Mem.ReadInt(objectTablePtr + (i * 0x2C));
entity = Mem.ReadInt(entity + 0x4);
You can then grab their VisualState.
Code:
int entityVS = Mem.ReadInt(entity + 0x1C);
And get their coords just like you would your own player.
Code:
float entityX = Mem.ReadFloat(entityVS + 0x28), entityY = Mem.ReadFloat(entityVS + 0x30), entityZ = Mem.ReadFloat(entityVS + 0x2C);
Done.
Quote Originally Posted by Chris View Post

Done.
Thankyou, but this confuses me so much, so " float entityX" etc are the enemy coords yes?
are all enemy coords stored in that one float? or are stored with their own float entityX? If a list then how would i look at each one to see which is closest?

i have my own coords like this
Code:
                    float LocalX = Memory.ReadFloat(VisualState + 0x28);
                    Console.WriteLine("   X : " + LocalX);
what im trying to do is

Code:
if LocalX - entityX = <100 
            {Console.Beep(800, 200);         
            Thread.Sleep(1000);
}
Or something like that anyway. Just a simple beep if some one is close.
Sorry for asking so many questions, i just cant figure it out
Quote Originally Posted by boombeachcpt View Post
Thankyou, but this confuses me so much, so " float entityX" etc are the enemy coords yes?
are all enemy coords stored in that one float? or are stored with their own float entityX? If a list then how would i look at each one to see which is closest?

i have my own coords like this
Code:
                    float LocalX = Memory.ReadFloat(VisualState + 0x28);
                    Console.WriteLine("   X : " + LocalX);
what im trying to do is

Code:
if LocalX - entityX = <100 
            {Console.Beep(800, 200);         
            Thread.Sleep(1000);
}
Or something like that anyway. Just a simple beep if some one is close.
Sorry for asking so many questions, i just cant figure it out
You might want to re-read my code.
Code:
float entityX = Mem.ReadFloat(entityVS + 0x28), entityY = Mem.ReadFloat(entityVS + 0x30), entityZ = Mem.ReadFloat(entityVS + 0x2C);
I have defined 3 variables there.
entityX, entityY and entityZ.
Each corresponds to the entities location.
If it helps you understand, you can write it like this.
Code:
float entityX = Mem.ReadFloat(entityVS + 0x28);
float entityY = Mem.ReadFloat(entityVS + 0x30);
float entityZ = Mem.ReadFloat(entityVS + 0x2C);
As for getting the distance between them, you'll have to do some research on that.
This would be a good start, decompile it and read through it.
Quote Originally Posted by boombeachcpt View Post
Works like a dream Thanks a lot man +rep

What about in a 200M radius if i have my location already as pX pY pZ
Believe this is solved.
/Closed
darkwrath you seem to be the wizkid of DayZ
Quote Originally Posted by rathynia View Post
darkwrath you seem to be the wizkid of DayZ
I am no wizard, I just read and put a little effort in
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us