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;