initial commit
This commit is contained in:
33
.gitignore
vendored
Normal file
33
.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
#Ignore thumbnails created by Windows
|
||||
Thumbs.db
|
||||
#Ignore files built by Visual Studio
|
||||
*.obj
|
||||
*.exe
|
||||
*.pdb
|
||||
*.user
|
||||
*.aps
|
||||
*.pch
|
||||
*.vspscc
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ncb
|
||||
*.suo
|
||||
*.tlb
|
||||
*.tlh
|
||||
*.bak
|
||||
*.cache
|
||||
*.ilk
|
||||
*.log
|
||||
[Bb]in
|
||||
[Dd]ebug*/
|
||||
*.lib
|
||||
*.sbr
|
||||
obj/
|
||||
[Rr]elease*/
|
||||
_ReSharper*/
|
||||
[Tt]est[Rr]esult*
|
||||
.vs/
|
||||
.idea/
|
||||
#Nuget packages folder
|
||||
packages/
|
||||
58
gta-anti-afk.ahk
Normal file
58
gta-anti-afk.ahk
Normal file
@@ -0,0 +1,58 @@
|
||||
; GTA Online Anti-AFK Script
|
||||
; Press F8 to start/stop the script
|
||||
; The script will press 'W' and 'S' keys every 4 minutes to prevent inactivity kick
|
||||
|
||||
#Requires AutoHotkey v2.0
|
||||
#SingleInstance Force
|
||||
|
||||
; Variables
|
||||
isRunning := false
|
||||
timerInterval := 240000 ; 4 minutes in milliseconds
|
||||
|
||||
; F8 to toggle the script on/off
|
||||
F8:: {
|
||||
global isRunning
|
||||
isRunning := !isRunning
|
||||
if (isRunning) {
|
||||
ToolTip("GTA Anti-AFK: ACTIVE - Sending input every 4 minutes")
|
||||
SoundBeep(1000, 200)
|
||||
TrayTip("Script is now ACTIVE", "GTA Anti-AFK")
|
||||
SetTimer(AntiAFK, timerInterval)
|
||||
SetTimer(() => ToolTip(), -3000) ; Hide tooltip after 3 seconds
|
||||
} else {
|
||||
ToolTip("GTA Anti-AFK: INACTIVE")
|
||||
SoundBeep(500, 200)
|
||||
TrayTip("Script is now INACTIVE", "GTA Anti-AFK")
|
||||
SetTimer(AntiAFK, 0)
|
||||
SetTimer(() => ToolTip(), -3000) ; Hide tooltip after 3 seconds
|
||||
}
|
||||
}
|
||||
|
||||
; Anti-AFK function
|
||||
AntiAFK() {
|
||||
; Send W key (move forward slightly)
|
||||
Send("{w down}")
|
||||
Sleep(100)
|
||||
Send("{w up}")
|
||||
|
||||
Sleep(200)
|
||||
|
||||
; Send S key (move backward slightly)
|
||||
Send("{s down}")
|
||||
Sleep(100)
|
||||
Send("{s up}")
|
||||
|
||||
; Optional: Show notification
|
||||
currentTime := FormatTime(, "HH:mm:ss")
|
||||
TrayTip("Input sent at " . currentTime, "GTA Anti-AFK")
|
||||
}
|
||||
|
||||
; F9 to exit the script completely
|
||||
F9:: {
|
||||
TrayTip("Script terminated", "GTA Anti-AFK")
|
||||
Sleep(1000)
|
||||
ExitApp()
|
||||
}
|
||||
|
||||
; Show initial instructions
|
||||
TrayTip("Press F8 to toggle ON/OFF`nPress F9 to exit script", "GTA Anti-AFK")
|
||||
Reference in New Issue
Block a user