HelpVerifying CUserCmd crashes when NPC in server

Posts 1–15 of 45 · Page 1 of 3
Verifying CUserCmd crashes when NPC in server
Hello community, I'm crashing when I'm verifying CUserCmd when theres a NPC in the server.

Code:
void WINAPI hkCreateMove(int sequence_number, float input_sample_frametime, bool active)
{
    oCreateMove(sequence_number, input_sample_frametime, active);
    CUserCmd* pCmd = hkGetUserCmd(sequence_number);
    if (!pCmd)
        return;

-- Aimbot, stuff here.

    CInput::CVerifiedUserCmd *pVerifiedCommands = *(CInput::CVerifiedUserCmd**)((DWORD)g_pInput + 0xC8);
    if (!pVerifiedCommands)
        return;

    CInput::CVerifiedUserCmd *pVerified = &pVerifiedCommands[sequence_number % MULTIPLAYER_BACKUP];
    if (!pVerified)
        return;

    pVerified->m_cmd = *pCmd;
    pVerified->m_crc = CRC32_ProcessSingleBuffer(pCmd, sizeof(CUserCmd));
}
I can fix it by using Clientmode but I want to verify it

please help

- - - Updated - - -

BumpBumpBumpBumpBumpBumpBumpBumpBumpBumpBump
Quote Originally Posted by Kyouko View Post
It's not the CUserCmd validation that makes you crash but probably something in your "aimbot, stuff"
No, I looked at some other hacks and I seen the vecshithook's compiled binary in HAC Booty has the same problem.

I also tried just verifying CUserCmd without doing anything but still crashes

- - - Updated - - -

Quote Originally Posted by Ariaa View Post
you sure its not your GetUserCmd hook?
Yes I'm sure.
Quote Originally Posted by skittz10 View Post
No, I looked at some other hacks and I seen the vecshithook's compiled binary in HAC Booty has the same problem.

I also tried just verifying CUserCmd without doing anything but still crashes

- - - Updated - - -

Yes I'm sure.
Have you even tried debugging it or are you just assuming this?
Quote Originally Posted by Ariaa View Post
Have you even tried debugging it or are you just assuming this?
Like you even know what C++ is, Especially knowing what true love is either you don't know both!
Quote Originally Posted by skittz10 View Post
Hello community, I'm crashing when I'm verifying CUserCmd when theres a NPC in the server.

Code:
void WINAPI hkCreateMove(int sequence_number, float input_sample_frametime, bool active)
{
    oCreateMove(sequence_number, input_sample_frametime, active);
    CUserCmd* pCmd = hkGetUserCmd(sequence_number);
    if (!pCmd)
        return;

-- Aimbot, stuff here.

    CInput::CVerifiedUserCmd *pVerifiedCommands = *(CInput::CVerifiedUserCmd**)((DWORD)g_pInput + 0xC8);
    if (!pVerifiedCommands)
        return;

    CInput::CVerifiedUserCmd *pVerified = &pVerifiedCommands[sequence_number % MULTIPLAYER_BACKUP];
    if (!pVerified)
        return;

    pVerified->m_cmd = *pCmd;
    pVerified->m_crc = CRC32_ProcessSingleBuffer(pCmd, sizeof(CUserCmd));
}
I can fix it by using Clientmode but I want to verify it

please help

- - - Updated - - -

BumpBumpBumpBumpBumpBumpBumpBumpBumpBumpBump
It's not the CUserCmd validation that makes you crash but probably something in your "aimbot, stuff"
Hook clientmode, it runs before createmove, you don't have to validate your usercmd, and you don't have to hook getusercmd.
It could also be a problem with your getusercmd hook (post code)

You could also hook writeusercmddeltatobuffer. There are many source examples on how to do this, (like this) but you might have to change offsets for garry's mod.
Quote Originally Posted by c0deine View Post
Hook clientmode, it runs before createmove, you don't have to validate your usercmd, and you don't have to hook getusercmd.
It could also be a problem with your getusercmd hook (post code)

You could also hook writeusercmddeltatobuffer. There are many source examples on how to do this, (like this) but you might have to change offsets for garry's mod.
CL_Move
->
Client->CreateMove
->
Input->CreateMove
->
ClientModeShared->CreateMove

The reason you don't have to verify your UserCmd is because Input CreateMove passes UserCmd to ClientModeShared CreateMove.
Quote Originally Posted by Ariaa View Post
CL_Move
->
Client->CreateMove
->
Input->CreateMove
->
ClientModeShared->CreateMove

The reason you don't have to verify your UserCmd is because Input CreateMove passes UserCmd to ClientModeShared CreateMove.
you're right, my bad I forgot the order of them I just knew you didn't have to validate it.
You could hook writeusercmddeltatobuffer but regarding being undetected it's not a good idea. ( in my testing recently, atleast )
There is however a lot of cool stuff you can do when you hook it, but i never did much with it

also from what i know, verifying your usercmds like that will give you a sound bug too.
Hooking clientmode as c0deine said is your best bet.
Quote Originally Posted by ehex View Post
You could hook writeusercmddeltatobuffer but regarding being undetected it's not a good idea. ( in my testing recently, atleast )
There is however a lot of cool stuff you can do when you hook it, but i never did much with it

also from what i know, verifying your usercmds like that will give you a sound bug too.
Hooking clientmode as c0deine said is your best bet.
I ended up hooking writeusercmddeltatobuffer since i hate clientmode for some reason
hook writeusercmddeltatobuffer
I'm going to try hooking writeusercmddeltatobuffer and report back

- - - Updated - - -

Is this still the sig for WriteUserCmd \x55\x8B\xEC\x8B\x45\x10\x8B\x48\x04
hook clientmode, check if command_number == 0 and return true at the top of the function
hook deltatobuffer, UserCmd copy = *to; copy.command_number = 1337; WriteUserCmd(buffer,&copy,from); to avoid the sound problem
nothing else
if you do not hook getusercmd or deltatobuffer you still can't edit the sequence number, and random_seed is overwritten in clientmode so you have to set it there too
Posts 1–15 of 45 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us