Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Timer delay{};
- int val = 0;
- int value[32] = { 0 };
- void FakeCrouch(CUserCmd *cmd)
- {
- if (!crouch || !(cmd->buttons & IN_DUCK))
- return;
- static bool bDoCrouch = false;
- static int iCrouchCount = 0;
- if (iCrouchCount == *dur)
- {
- iCrouchCount = 0;
- bDoCrouch = !bDoCrouch;
- }
- else
- {
- iCrouchCount++;
- }
- if (bDoCrouch)
- {
- cmd->buttons |= IN_DUCK;
- *bSendPackets = true;
- }
- else
- {
- if (iCrouchCount + *dursneak < *dur)
- cmd->buttons &= ~IN_DUCK;
- *bSendPackets = false;
- }
- if ((cmd->buttons & IN_ATTACK))
- *bSendPackets = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement