CUserCmd

Posts 1–13 of 13 · Page 1 of 1
CUserCmd
Hello, I've sitten many hours now and i can't get my usercmd to work, i've tried many different sources and they either crash or doesn't work at all.

Here's some different methods i've tried but there are more :P
Code:
	m_pInput = *(CInput**)(PatternScan("client.dll", "B9 ?? ?? ?? ?? FF 75 08 E8 ?? ?? ?? ?? 8B 06") + 1);
	if (!m_pInput)
	{
		std::cout << "Trying method 2" << std::endl;
		uintptr_t* pVmt = *(uintptr_t**)Engine::Interface::m_pClient;
		m_pInput = *(CInput**)(pVmt[21] + 0x5F);
	}
	if (!m_pInput)
		std::cout << "Didn't get m_pInput!" << std::endl;
This is how i tried to get m_pInput, it's probably an outdated pattern but whatever.

Code:
	CUserCmd* cmdlist = *(CUserCmd**)((DWORD)m_pInput + 0xEC);
	CUserCmd* pCmd = &cmdlist[sequence_number % 150];


	CVerifiedUserCmd* verifiedlist = *(CVerifiedUserCmd**)((DWORD)m_pInput + 0xF0);
	CVerifiedUserCmd* verified = &verifiedlist[sequence_number % 150];
This simply just doesn't work.

Code:
	CUserCmd* pCmd = m_pInput->GetUserCmd(sequence_number)
and not this either.

So does anybody know how to make it work?

EDIT: Got it half-working, i can read pCmd->viewangles.x and .y but i cannot change them same with tick_count. I belive it's an easy fix so if anybody got time to answer i'd be very nice.
Quote Originally Posted by affe2626 View Post
Hello, I've sitten many hours now and i can't get my usercmd to work, i've tried many different sources and they either crash or doesn't work at all.

Here's some different methods i've tried but there are more :P
Code:
	m_pInput = *(CInput**)(PatternScan("client.dll", "B9 ?? ?? ?? ?? FF 75 08 E8 ?? ?? ?? ?? 8B 06") + 1);
	if (!m_pInput)
	{
		std::cout << "Trying method 2" << std::endl;
		uintptr_t* pVmt = *(uintptr_t**)Engine::Interface::m_pClient;
		m_pInput = *(CInput**)(pVmt[21] + 0x5F);
	}
	if (!m_pInput)
		std::cout << "Didn't get m_pInput!" << std::endl;
This is how i tried to get m_pInput, it's probably an outdated pattern but whatever.

Code:
	CUserCmd* cmdlist = *(CUserCmd**)((DWORD)m_pInput + 0xEC);
	CUserCmd* pCmd = &cmdlist[sequence_number % 150];


	CVerifiedUserCmd* verifiedlist = *(CVerifiedUserCmd**)((DWORD)m_pInput + 0xF0);
	CVerifiedUserCmd* verified = &verifiedlist[sequence_number % 150];
This simply just doesn't work.

Code:
	CUserCmd* pCmd = m_pInput->GetUserCmd(sequence_number)
and not this either.

So does anybody know how to make it work?

Maybe because the pattern does not work?
Quote Originally Posted by WildAssassinz View Post
Maybe because the pattern does not work?
Yes but I've tried more methods as I said, and it still doesn't work.
Do you have a working pattern xd?
Quote Originally Posted by affe2626 View Post
Yes but I've tried more methods as I said, and it still doesn't work.
Do you have a working pattern xd?
Sadly no, I don't use m_input (what is it even used for)
Quote Originally Posted by WildAssassinz View Post
Sadly no, I don't use m_input (what is it even used for)
Code:
class CInput
{
public:
	CUserCmd* GetUserCmd(int sequence_number) //This 
	{
		return &m_pCommands[sequence_number % 150];
	}

	CVerifiedUserCmd* GetVerifiedUserCmd(int sequence_number) //and this
	{
		return &m_pVerifiedCommands[sequence_number % 150];
	}

	unsigned char		__pad0[0xEC]; // and this

	CUserCmd*			m_pCommands; //this too.. 
	CVerifiedUserCmd*	m_pVerifiedCommands; //and THIS surprisingly :P
};
Quote Originally Posted by affe2626 View Post
Code:
class CInput
{
public:
	CUserCmd* GetUserCmd(int sequence_number) //This 
	{
		return &m_pCommands[sequence_number % 150];
	}

	CVerifiedUserCmd* GetVerifiedUserCmd(int sequence_number) //and this
	{
		return &m_pVerifiedCommands[sequence_number % 150];
	}

	unsigned char		__pad0[0xEC]; // and this

	CUserCmd*			m_pCommands; //this too.. 
	CVerifiedUserCmd*	m_pVerifiedCommands; //and THIS surprisingly :P
};
You could possibly look on other forums


Code:
class CUserCmd
{
public:
	virtual ~CUserCmd() {}; //Destructor 0
	CUserCmd()
	{
		Reset();
	}

	void Reset()
	{
		command_number = 0;
		tick_count = 0;
		viewangles.Init();
		forwardmove = 0.0f;
		sidemove = 0.0f;
		upmove = 0.0f;
		buttons = 0;
		impulse = 0;
		weaponselect = 0;
		weaponsubtype = 0;
		random_seed = 0;
		mousedx = 0;
		mousedy = 0;
		headangles.Init();
		headoffset.Init();

		hasbeenpredicted = false;
	}

	CUserCmd& operator =(const CUserCmd& src)
	{
		if (this == &src)
			return *this;

		command_number = src.command_number;
		tick_count = src.tick_count;
		viewangles = src.viewangles;
		forwardmove = src.forwardmove;
		sidemove = src.sidemove;
		upmove = src.upmove;
		buttons = src.buttons;
		impulse = src.impulse;
		weaponselect = src.weaponselect;
		weaponsubtype = src.weaponsubtype;
		random_seed = src.random_seed;
		mousedx = src.mousedx;
		mousedy = src.mousedy;

		hasbeenpredicted = src.hasbeenpredicted;
		headangles = src.headangles;
		headoffset = src.headoffset;
		return *this;
	}

	CUserCmd(const CUserCmd& src)
	{
		*this = src;
	}


	int        command_number;
	int        tick_count;
	Vector  viewangles;
	Vector    aimdirection;
	float    forwardmove;
	float    sidemove;
	float    upmove;
	int        buttons;
	BYTE    impulse;
	int        weaponselect;
	int        weaponsubtype;
	int        random_seed;
	short    mousedx;
	short    mousedy;
	bool    hasbeenpredicted;
	Vector  headangles;
	Vector    headoffset;
};
Quote Originally Posted by WildAssassinz View Post
You could possibly look on other forums


Code:
class CUserCmd
{
public:
	virtual ~CUserCmd() {}; //Destructor 0
	CUserCmd()
	{
		Reset();
	}

	void Reset()
	{
		command_number = 0;
		tick_count = 0;
		viewangles.Init();
		forwardmove = 0.0f;
		sidemove = 0.0f;
		upmove = 0.0f;
		buttons = 0;
		impulse = 0;
		weaponselect = 0;
		weaponsubtype = 0;
		random_seed = 0;
		mousedx = 0;
		mousedy = 0;
		headangles.Init();
		headoffset.Init();

		hasbeenpredicted = false;
	}

	CUserCmd& operator =(const CUserCmd& src)
	{
		if (this == &src)
			return *this;

		command_number = src.command_number;
		tick_count = src.tick_count;
		viewangles = src.viewangles;
		forwardmove = src.forwardmove;
		sidemove = src.sidemove;
		upmove = src.upmove;
		buttons = src.buttons;
		impulse = src.impulse;
		weaponselect = src.weaponselect;
		weaponsubtype = src.weaponsubtype;
		random_seed = src.random_seed;
		mousedx = src.mousedx;
		mousedy = src.mousedy;

		hasbeenpredicted = src.hasbeenpredicted;
		headangles = src.headangles;
		headoffset = src.headoffset;
		return *this;
	}

	CUserCmd(const CUserCmd& src)
	{
		*this = src;
	}


	int        command_number;
	int        tick_count;
	Vector  viewangles;
	Vector    aimdirection;
	float    forwardmove;
	float    sidemove;
	float    upmove;
	int        buttons;
	BYTE    impulse;
	int        weaponselect;
	int        weaponsubtype;
	int        random_seed;
	short    mousedx;
	short    mousedy;
	bool    hasbeenpredicted;
	Vector  headangles;
	Vector    headoffset;
};
Yea that is the CUserCmd class, we were talking about the CInput class lel.. i already have that class.
Quote Originally Posted by affe2626 View Post
Yea that is the CUserCmd class, we were talking about the CInput class lel.. i already have that class.
oh you put CUserCmd as your title
The index for GetUserCmd is 8 iirc. Also, why bother with this? Hook cmove through client mode, there's no reason to have to mess with verified usercmd shit
Quote Originally Posted by Aphu View Post
The index for GetUserCmd is 8 iirc. Also, why bother with this? Hook cmove through client mode, there's no reason to have to mess with verified usercmd shit
bool*__fastcall*hookedCreatemove(void*thisptr,*int *edx,*float*tick,*CUserCmd*Cmd);

Do you mean that function? and also what Index is that? is it in ClientMode in VClient?. I'm new to hooking so don't hate ty
Quote Originally Posted by affe2626 View Post
bool*__fastcall*hookedCreatemove(void*thisptr,*int *edx,*float*tick,*CUserCmd*Cmd);

Do you mean that function? and also what Index is that? is it in ClientMode in VClient?. I'm new to hooking so don't hate ty
yes that is cmove
Code:
	/* grab clientmode */
	void ** g_pBaseClient = *(void***)g_pClient;
	g_pClientMode = *(IClientModeShared***)((DWORD)g_pBaseClient[10] + 5);
Been over a week since last update/bump after answers, assuming solved.

/Closed.
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us