WriteProcessMemory help
So I've been working on reading the QAngle of the player and then trying to set to new values.
So far reading the QAngle doesn't seem to be a problem but can anyone see what im doing wrong with writing the new angle values back?
Edit: I'm assuming my offsets are just off or something
Code:
void test(DWORD addr){
QAngle read;
ReadProcessMemory(process, (void*)addr, &read, sizeof(QAngle), NULL);
std::cout<<"x: "<<read.x<<" y: "<< read.y<< " z: " <<read.z<<endl;
read.x = 0.509229;
read.y = 133.499;
read.z = -0.0945261;
std::cout<<"x: "<<read.x<<" y: "<< read.y<< " z: " <<read.z<<endl;
WriteProcessMemory(process, (void*)addr, &read, sizeof(read), 0);
}
Edit: I'm assuming my offsets are just off or something