Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with CUserCmdBase #11

Open
unknownguy1993 opened this issue Oct 6, 2023 · 10 comments
Open

Problem with CUserCmdBase #11

unknownguy1993 opened this issue Oct 6, 2023 · 10 comments

Comments

@unknownguy1993
Copy link

unknownguy1993 commented Oct 6, 2023

I am trying to give 450.f value like in csgo to m_forwardmove, but it doesn't really do anything, I tried to print the value and I get only 0, I want to know if it is an offsets problem or something else to implement?

class CUserCmdBase { public: PAD_CLASS(0x40); QAngle m_viewangles; int m_command_number; int m_tick_count; float m_forwardmove; float m_rightmove; float m_upmove; };

@unknownguy1993
Copy link
Author

unknownguy1993 commented Oct 6, 2023

In cs:go the forward move range was from -450.f to 450.f, and now it goes from -1.f to 1.f, I try to give it a value from createmove but it doesn't really work, any idea?

class CUserCmdBase { public: PAD_CLASS(0x40); QAngle m_viewangles; int m_command_number; float m_forwardmove; float m_sidemove; };

class CUserCmd {
 public:
  PAD_CLASS(0x20);
  CSubTickContainer m_sub_tick_container;
  CUserCmdBase* m_base_cmd;
  int m_start_history_index_attack1;
  int m_start_history_index_attack2;
  int m_start_history_index_attack3;
  PAD_CLASS(0x8);
  uint64_t m_buttons;
  uint64_t m_buttons_changed;
  uint64_t m_buttons_scroll;

  PAD_CLASS(0x8);
};

 CUserCmd* cmd = input->get_user_cmd();

  if (cmd == nullptr) {
   return;
  }

  auto base_cmd = *cmd->m_base_cmd;
  base_cmd.m_forwardmove = 1.f;`

@maecry
Copy link

maecry commented Oct 6, 2023

auto base_cmd = *cmd->m_base_cmd;

why would you deref the ptr? ofc it wont modify anything dumbass (bro even went on new github acc to avoid getting bully 💀💀💀)

@alza54
Copy link
Owner

alza54 commented Oct 7, 2023

@unknownguy1993 can’t really assist right now. The class has to be verified is it up-to-date. Current goals are around visuals.

Suggest a feature and it will be added in next releases.

@unknownguy1993
Copy link
Author

unknownguy1993 commented Oct 7, 2023

auto base_cmd = *cmd->m_base_cmd;

¿Por qué eliminarías el ptr? Por supuesto, no modificará nada, tonto (el hermano incluso ingresó a una nueva cuenta de github para evitar ser intimidado 💀💀💀)

auto base_cmd = *cmd->m_base_cmd;

why would you deref the ptr? ofc it wont modify anything dumbass (bro even went on new github acc to avoid getting bully 💀💀💀)

I just created my account because I didn't have one, I'm new to this, I was asking you with the best of intentions, because now m_forwardmove in csgo was going from -450.f to 450.f and now it only goes from -1.f to 1.f, and I can't modify its value, I was waiting for help, but I didn't expect you to be toxic

@unknownguy1993
Copy link
Author

auto base_cmd = *cmd->m_base_cmd;

why would you deref the ptr? ofc it wont modify anything dumbass (bro even went on new github acc to avoid getting bully 💀💀💀)

And thanks for your sarcastic comment, the error was the "" that was in cmd->m_base_cmd, I moved it to "auto" and now it works, thanks

@alza54
Copy link
Owner

alza54 commented Oct 7, 2023

@unknownguy1993 Could you elaborate? What are you trying to create and what did help you?

@alza54
Copy link
Owner

alza54 commented Oct 7, 2023

Your comment might help other users so it’s good to share the information.

@maecry
Copy link

maecry commented Oct 7, 2023

@unknownguy1993 Could you elaborate? What are you trying to create and what did help you?

Just dont deref the ptr and it should be fine as i said earlier
Aka
auto base_cmd = cmd->m_base_cmd; (no "*" symbol !!!!!)
He was making a copy to base cmd ptr, so he just modified the copied one, not the actual basecmd

@unknownguy1993
Copy link
Author

unknownguy1993 commented Oct 7, 2023

@unknownguy1993 Could you elaborate? What are you trying to create and what did help you?

Just dont deref the ptr and it should be fine as i said earlier Aka auto base_cmd = cmd->m_base_cmd; (no "*" symbol !!!!!) He was making a copy to base cmd ptr, so he just modified the copied one, not the actual basecmd

auto* base_cmd = cmd->m_base_cmd; I just did that and it works, it needs the * anyway, the problem was where I placed it :)

@unknownguy1993
Copy link
Author

unknownguy1993 commented Oct 7, 2023

@unknownguy1993 Could you elaborate? What are you trying to create and what did help you?

in game_hooks.cpp on line 94 instead of auto base_cmd = *cmd->m_base_cmd; is -> auto* base_cmd = cmd->m_base_cmd;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants