Solved Having trouble getting and setting the viewangles

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

miifanboy

Full Member
Aug 14, 2019
18
193
2
How long you been coding/hacking?
2 year
Coding Language
c#,c++
Hey,

For the last week I am learning c++ in order to code an external cheat for csgo. Actually it was easy because I coded an external csgo cheat in c# in the past.
Today , I was trying to get and set the viewangles for the local player but the code I have written did not work. This code should set my pitch angle to 89 and my yaw value to 179.The console output is -1.07374E+08 for both currentviewangles.x and currentviewangles.y and when I move my mouse , the value does not change. I used hazedumper to find the offsets.

In a loop::
                DWORD ClientState;
                Vector3 CurrentViewAngles;
                ReadProcessMemory(hProc, (LPVOID)((DWORD)engineAddress + offs::dwClientState), &ClientState, sizeof(DWORD), NULL);              
                ReadProcessMemory(hProc, (LPVOID)((DWORD)ClientState + offs::dwClientState_ViewAngles), &CurrentViewAngles, sizeof(Vector3), NULL);  
                Vector3 anglestoaim;
                anglestoaim.x = 89.0;
                anglestoaim.y = 179.0;
                anglestoaim.z = 0.0;
               
               
               
                std::cout << CurrentViewAngles.x;
                std::cout << CurrentViewAngles.y;
                wpm<Vector3>(anglestoaim, ClientState + offs::dwClientState_ViewAngles);
Vector3 code:
struct Vector3
{
    float x,y,z;
}
Is there anything wrong with the code ?
 
Last edited:

miifanboy

Full Member
Aug 14, 2019
18
193
2
Turns out that the problem was getting the engine.dll module. I fixed it by replacing the get module function with the one I found on this forum.
 

XdarionX

Dying Light Hacker
Dank Tier VIP
Dank Tier Donator
Mar 30, 2018
878
24,608
116
Hey,

For the last week I am learning c++ in order to code an external cheat for csgo. Actually it was easy because I coded an external csgo cheat in c# in the past.
Today , I was trying to get and set the viewangles for the local player but the code I have written did not work. This code should set my pitch angle to 89 and my yaw value to 179.The console output is -1.07374E+08 for both currentviewangles.x and currentviewangles.y and when I move my mouse , the value does not change. I used hazedumper to find the offsets.

In a loop::
                DWORD ClientState;
                Vector3 CurrentViewAngles;
                ReadProcessMemory(hProc, (LPVOID)((DWORD)engineAddress + offs::dwClientState), &ClientState, sizeof(DWORD), NULL);             
                ReadProcessMemory(hProc, (LPVOID)((DWORD)ClientState + offs::dwClientState_ViewAngles), &CurrentViewAngles, sizeof(Vector3), NULL); 
                Vector3 anglestoaim;
                anglestoaim.x = 89.0;
                anglestoaim.y = 179.0;
                anglestoaim.z = 0.0;
              
              
              
                std::cout << CurrentViewAngles.x;
                std::cout << CurrentViewAngles.y;
                wpm<Vector3>(anglestoaim, ClientState + offs::dwClientState_ViewAngles);
Vector3 code:
struct Vector3
{
    float x,y,z;
}
Is there anything wrong with the code ?
i dont see there any problem, check if hProc has really PROCESS_VM_READ flag, engine base is correct and all offsets are correct (run in -insecure and inspect in cheat engine)

edit: -1.07374E+08 in hex is 0xCCCCCCCC which means the read acction was unsuccessful, check GetLastError
 

miifanboy

Full Member
Aug 14, 2019
18
193
2
I forgot to add. My glow , bhop and trigger bot works fine so I don't think the problem is in PROCESS_VM_READ flag. I got the error code 12B , found a code to convert that error code to string but couldn't find a fix for that. The error message said "Only part of the ReadProcessMemory or WriteProcessMemory request completed"

edit: I checked hProc again and saw that I have PROCESS_ALL_ACCESS flag.
 
Last edited:

XdarionX

Dying Light Hacker
Dank Tier VIP
Dank Tier Donator
Mar 30, 2018
878
24,608
116
I forgot to add. My glow , bhop and trigger bot works fine so I don't think the problem is in PROCESS_VM_READ flag. I got the error code 12B , found a code to convert that error code to string but couldn't find a fix for that. The error message said "Only part of the ReadProcessMemory or WriteProcessMemory request completed"

edit: I checked hProc again and saw that I have PROCESS_ALL_ACCESS flag.
you are reading invalid memory, print out the addresses in console and see them in CE, your offsets are probably outdated
 

miifanboy

Full Member
Aug 14, 2019
18
193
2
Rake, thank you for the tutorials you sent. I used cheat engine to check if the offsets are wrong or not but they weren't wrong .Then when I debugged my cheat , I found that engineAdress was equal to 0. There is something wrong with the get module function I will look into that when I have time.
 
  • Like
Reactions: Rake
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods