monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
It's hard to tell what is wrong. I think it would help if you posted reference to the original "skidded" work (I assume the code you posted is the modified version of it)

What do you mean by saying "it doesn't work"?
- It fails to compile because of some error?
- It compiles fine but crashes the game?
- It doesn't crash the game but it also doesn't change shooting direction?

Typically mods that work as separate processes (externally) are just reading and writing memory using "ReadProcessMemory" and "WriteProcessMemory". If you want to convert such mod to "internal" one ("dll" injected into game process), then you should remove these function calls.

In case of ReadProcessMemory you can replace them with something like this:

float *ptr_to_float_value = 0xAAAAAAAA; // declaring a pointer
float value = *ptr_to_float_value; // dereferencing a pointer (to read its value)

or using cast more directly like:

float value = *(float*)0xAAAAAAAA;

In case of WriteProcessMemory you can replace them with something like this:

float *ptr_to_float_value = 0xAAAAAAAA;
*ptr_to_float_value = 1.0f;
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
btw the "m_" prefix tends to be used to mark class members (according to this coding style article)
In the posted code part "m_" is just making variable names more confusing
 

Best Friend of Death

Active member
Joined
Jul 2, 2021
Messages
31
Reaction score
2
Location
CZ
There's no points answering me this i asked for someone who have ability to convert external code to internal and i didn't asked for someone tell me what i have to learn
lmao nigger,answer his question then, a people who cant define func in c, thats all i see xddddddddddddddddddddddddddddddddddddddddddddddddddddddddd mf
 
Top