designer1337 / csgo-cheat-base

simple csgo internal base.
MIT License
242 stars 50 forks source link

Getting deadflag netvar #57

Closed Qufi closed 4 years ago

Qufi commented 4 years ago

hey, this seems like an odd question, but I really have a hard time getting the deadflag netvar. What I already tried:

1) NETVAR("DT_CSPlayer", "deadlag", deadflag, int);
2) auto dwFlag = netvar_manager::get_net_var(fnv::hash("CBasePlayer"), fnv::hash("deadflag"));

What is the problem?

(I know it's wrong because I am getting a nullpointer, for example with: *reinterpret_cast<vec3_t*>(reinterpret_cast<DWORD>(csgo::local_player) + dwFlag + 4) )

bruhmoment21 commented 4 years ago
vec3_t* get_v_angles() {
        return reinterpret_cast<vec3_t*>(reinterpret_cast<uintptr_t>(this) + netvar_manager::get_net_var(fnv::hash("DT_BasePlayer"), fnv::hash("deadflag")) + 4);
    }
bruhmoment21 commented 4 years ago

possibily deadlag and CBasePlayer which is DT_BasePlayer

Qufi commented 4 years ago

Hey, thanks for your answer. I tried multiple things now:

` auto deadflag = netvar_manager::get_net_var(fnv::hash("DT_BasePlayer"), fnv::hash("deadflag"));

auto deadflag = netvar_manager::get_net_var(fnv::hash("CBasePlayer"), fnv::hash("deadflag"));

auto deadflag = netvar_manager::get_net_var(fnv::hash("DT_BasePlayer"), fnv::hash("deadlag")); `

All gave me back 0, so somehow it doesn't find the netvar. What is wrong? @bruhmoment21

bruhmoment21 commented 4 years ago

Hey, thanks for your answer. I tried multiple things now:

` auto deadflag = netvar_manager::get_net_var(fnv::hash("DT_BasePlayer"), fnv::hash("deadflag"));

auto deadflag = netvar_manager::get_net_var(fnv::hash("CBasePlayer"), fnv::hash("deadflag"));

auto deadflag = netvar_manager::get_net_var(fnv::hash("DT_BasePlayer"), fnv::hash("deadlag")); `

All gave me back 0, so somehow it doesn't find the netvar. What is wrong? @bruhmoment21

is there a use for deadflag except getting view_angles? for what you use it

Qufi commented 4 years ago

I want to draw the view angles of a model, better said show my anti aim in third person. I researched a bit and every time people use the cast I wrote above with deadflag.

bruhmoment21 commented 4 years ago

I want to draw the view angles of a model, better said show my anti aim in third person. I researched a bit and every time people use the cast I wrote above with deadflag.

vec3_t* get_v_angles() { // get_view_angles
        return reinterpret_cast<vec3_t*>(reinterpret_cast<uintptr_t>(this) + netvar_manager::get_net_var(fnv::hash("DT_BasePlayer"), fnv::hash("deadflag")) + 4);
    }

this doesn't work?

bruhmoment21 commented 4 years ago

maybe you shouldn't dereference this ->*reinterpret_cast<vec3_t*>(reinterpret_cast<DWORD>(csgo::local_player) + dwFlag + 4) im still learning p0inters

Qufi commented 4 years ago

netvar_manager::get_net_var(fnv::hash("DT_BasePlayer"), fnv::hash("deadflag")) is always zero so I am writing to a wrong pointer, that's my problem.

Qufi commented 4 years ago

I want to draw the view angles of a model, better said show my anti aim in third person. I researched a bit and every time people use the cast I wrote above with deadflag.

vec3_t* get_v_angles() { // get_view_angles
      return reinterpret_cast<vec3_t*>(reinterpret_cast<uintptr_t>(this) + netvar_manager::get_net_var(fnv::hash("DT_BasePlayer"), fnv::hash("deadflag")) + 4);
  }

this doesn't work?

So this here doesn't and can't work either.

bruhmoment21 commented 4 years ago

I want to draw the view angles of a model, better said show my anti aim in third person. I researched a bit and every time people use the cast I wrote above with deadflag.

vec3_t* get_v_angles() { // get_view_angles
        return reinterpret_cast<vec3_t*>(reinterpret_cast<uintptr_t>(this) + netvar_manager::get_net_var(fnv::hash("DT_BasePlayer"), fnv::hash("deadflag")) + 4);
    }

this doesn't work?

So this here doesn't and can't work either.

it worked for me when i was using thirdperson in override view in April can t be this outdated tho

Qufi commented 4 years ago

hm, I am totally crashing after *get_v_angles() = qLastTickAngles; The variable is storing the last view angles. Imo it's because deadflag is 0 so it is writing to a wrong location.

bruhmoment21 commented 4 years ago

hm, I am totally crashing after *get_v_angles() = qLastTickAngles; The variable is storing the last view angles. Imo it's because deadflag is 0 so it is writing to a wrong location.

don't dereference get_v_angles this is how you get it: vec3_t* view = local_player->get_v_angles( );