Counter Strafing script fix needed CSGO

Ask gaming related questions (AHK v1.1 and older)
voroo30
Posts: 1
Joined: 26 Oct 2019, 02:06

Counter Strafing script fix needed CSGO

26 Oct 2019, 02:25

The counter strafing script has a problem where it pushes the opposite key for the same length no matter how long or short the key is pressed causing you to move backwards if you tap the key. A solution would be to have a time based formula that presses the opposite key for a fraction of time the main key was pressed but up to a certain point to not cause you to move back for 5 seconds. The problem is that I do not know how to code it in.

Code: Select all

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

~F7::
If ScriptActive = 1
{
ScriptActive = 0
SoundBeep, 400, 400
}
else if ScriptActive = 0
{
ScriptActive = 1
SoundBeep, 1000, 100
SoundBeep, 1000, 100
}
return
Sid4G
Posts: 48
Joined: 02 Apr 2016, 19:11

Re: Counter Strafing script fix needed CSGO

26 Oct 2019, 07:30

Good luck in faceit with that script :D
torske
Posts: 2
Joined: 15 Jan 2020, 16:42

Re: Counter Strafing script fix needed CSGO

15 Jan 2020, 18:25

Have you found a solution?
I really want this.
torske
Posts: 2
Joined: 15 Jan 2020, 16:42

Re: Counter Strafing script fix needed CSGO

15 Jan 2020, 19:48

When you just tap the one of the WASD, it goes back to where it started.

A solution would be to not excute the script the first 0.4 sec.
Like this:

Tap - (timer 0.4 sec) the script don't executes, just press the keys as normal. Should be able to interrupt it before 0.4 sec by releasing the key.

Holding - After 0.4 sec the script would activate.

Could someone code this for me. I tried for several hours. :(

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 44 guests