kwilcz / Antario

Clean base/cheat made for CS:GO.
MIT License
133 stars 34 forks source link

GetAimPunchAngle Crashes #59

Closed suaducrus closed 5 years ago

suaducrus commented 5 years ago

Sry if I'm still new to csgo internals, I've checked multiple working public sources and they are doing it the same way, and it works perfectly fine. I tried debugging and it is crashing on GetOffsetRecursive.

Vector GetAimPunchAngle() { static int m_aimPunchAngle = g_pNetvars->GetOffset("DT_BasePlayer", "m_aimPunchAngle"); return GetValue(m_aimPunchAngle); }

Not sure if bug or I'm doing something wrong.

suaducrus commented 5 years ago

after searching for hours I still didnt find a solution, and 5mins after i posted an issue i fixed it...

for any1 with same issue DT_BasePlayer->localdata->->m_Local->m_aimPunchAngle seems to work.

Now I'm just trying to figure out why this works differently on this base. It will be greatly appreciated if someone smarter than I am can enlighten me the cause of the difference. Thank You for your time!

kwilcz commented 5 years ago

Check how GetOffset works. It requires full path since if it doesn't find the specified key, it returns invalid pointer (look here: https://github.com/Wando1423/Antario/blob/master/Antario/Utils/NetvarManager.h#L55).

suaducrus commented 5 years ago

I see, Thanks for the quick response, I'll spend some time studying how the GetOffset works here in comparison to other bases(the one I was looking at was CSGOSimple)

In addition, sry if this is the wrong place to ask for help, but I'll give it a shot anyway. Sry if this is a super dumb question.

How do u figure out the vtable Indexes for different things I want to hook? and how can I go about finding the full paths for offsets? Is there anyway without getting into reverse engineering?

Another one I cant seem to find the full path for is "m_iShotsFired", I tried searching it up like I did previously, but wasn't able to get anywhere. (Pretty much all the public resources I find doesn't need the full path)

kwilcz commented 5 years ago

"DT_CSPlayer->cslocaldata->m_iShotsFired" Just debug and see how the nodes / maps work in the netvarmanager. You can even dump them all recursively into console / file (you have log functions for that). Since it works almost 1:1 like the csgo one, you can learn from it.

About vtable indexes, look up on how vfunctions assign indexes online, its not that hard.