Smooth jumping with counter-strafe CS:GO

Post gaming related scripts
alanESV2
Posts: 1
Joined: 25 Aug 2016, 16:24

Smooth jumping with counter-strafe CS:GO

25 Aug 2016, 16:42

I modified a counter-strafe code that I found to make bhops work a little better. I deleted the side counter-strafing (A and D), made it work with the mousewheel instead of the spacebar, and some other details.

The one problem that we have now is just normal forward jumping (W). I coded so that:

if GetKeyState("WheelDown","P")
{
Send {w up}

What we need to do now is make it so if we KEEP pressing "w" for some milliseconds, Send {w down}.

Here's the code:


ScriptActive = 1

If ScriptActive = 1
{
$WheelDown::
if GetKeyState("WheelDown","P")
{
Send {WheelDown down}
Send {w up}
sleep, 1
Send {WheelDown up}
ScriptActive = 0
Sleep, 100
}
ScriptActive = 1
Return
}

~*w up::
If ScriptActive = 1
{
if(GetKeyState("s","P")) ; if w is pressed, do not perform sub
return
start:=A_TickCount
start+=110
Send {s down}
While (!GetKeyState("s","P") && A_TickCount<start) ; if w is pressed, exit this While loop. Exit after 100 ms regardless
Sleep 10
If !GetKeyState("s","P") ; if you are holding w down physically, you don't want to send a w up keystroke
Send {s up}
}
return



~*s up::
If ScriptActive = 1
{
if(GetKeyState("w","P")) ; if w is pressed, do not perform sub
return
start:=A_TickCount
start+=110
Send {w down}
While (!GetKeyState("w","P") && A_TickCount<start) ; if w is pressed, exit this While loop. Exit after 100 ms regardless
Sleep 10
If !GetKeyState("w","P") ; if you are holding w down physically, you don't want to send a w up keystroke
Send {w up}
}
return

~F7::
SoundBeep, 400, 400
Suspend Toggle
return

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 48 guests