I need some1 who can help me to make SA:MP anti-afk script, SA:MP is basically 14 years old game (San Andreas Multiplayer), it's a part of GTA:SA from 2004, for the ones who doesn't know about the game.
I need to make next.
1.start script on insert
2.script needs to write "/id" every 9 minutes, after it writes, it needs to press esc so i tab out of game, after 9 minutes it tabs in and writes /id, repeat.
GTA SA (SA:MP) ANTI-AFK SCRIPT Topic is solved
GTA SA (SA:MP) ANTI-AFK SCRIPT Topic is solved
Last edited by blickyy on 30 Jul 2020, 04:00, edited 1 time in total.
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
What I want to make from this is to put ESC before /id and ESC after /idscript wrote:Numpad1::
Toggle := !Toggle
While Toggle{
Sendinput t/id{enter}
sleep 30000
}
Numpad5:: pause
return
- Yakshongas
- Posts: 590
- Joined: 21 Jan 2020, 08:41
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Start the script with the game unpaused to test.
Code: Select all
#MaxThreadsPerHotkey, 2
Toggle := 0
Insert::
Toggle := !Toggle
Send, {Esc}
While (Toggle = 1)
{
Send, {Esc}t /id{Enter}{Esc}{AltTab}
Sleep, 540000 ;9 Min
}
Return
Please mark your topics as solved if you don't need any further help.
Need a little more help? Discord : Yakshongas#9893 🕹
Need a little more help? Discord : Yakshongas#9893 🕹
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Alright I will try it
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
It's not working, Esc is not working, it inputs the text like /id, but Esc is not sending, because I think SetKeyDelay needs to be usedYakshongas wrote: ↑28 Jul 2020, 15:37Start the script with the game unpaused to test.
Code: Select all
#MaxThreadsPerHotkey, 2 Toggle := 0 Insert:: Toggle := !Toggle Send, {Esc} While (Toggle = 1) { Send, {Esc}t /id{Enter}{Esc}{AltTab} Sleep, 540000 ;9 Min } Return
- Yakshongas
- Posts: 590
- Joined: 21 Jan 2020, 08:41
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Then add under #MaxThreadsPerHotkey, 2, SetKeyDelay, 50, 50
Please mark your topics as solved if you don't need any further help.
Need a little more help? Discord : Yakshongas#9893 🕹
Need a little more help? Discord : Yakshongas#9893 🕹
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
It works now, but it doesn't alt tabs, if possible to somehow after typing /id it presses Esc and then does CTRL+D to switch to the desktop? And after it repeats the process by switching window to gta_sa.exe with WinActivate at the top?
Code: Select all
#MaxThreadsPerHotkey, 2
SetKeyDelay, 50, 50
Toggle := 0
Insert::
Toggle := !Toggle
While (Toggle = 1)
{
Send, {Esc}t/id{Enter}
Send, {Esc}{AltTab}
Sleep, 15000
}
- Yakshongas
- Posts: 590
- Joined: 21 Jan 2020, 08:41
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Like this?
Code: Select all
#MaxThreadsPerHotkey, 2
SetKeyDelay, 50, 50
Toggle := 0
Insert::
Toggle := !Toggle
While (Toggle = 1)
{
WinActivate, Ahk_exe gta_sa.exe
Sleep, 2000 ;Adjust if needed
Send, {Esc}t/id{Enter}
Send, {Esc}{LAlt Down}{Tab}{LAlt Up}
Sleep, 15000
}
Please mark your topics as solved if you don't need any further help.
Need a little more help? Discord : Yakshongas#9893 🕹
Need a little more help? Discord : Yakshongas#9893 🕹
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Yes, exactly, that actually is now working, thank you so much!
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
@Yakshongas but can it be CTRL+D instead of ALT+TAB?
- Yakshongas
- Posts: 590
- Joined: 21 Jan 2020, 08:41
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Of course! like this:
Code: Select all
{LControl Down}d{LControl Up}
Please mark your topics as solved if you don't need any further help.
Need a little more help? Discord : Yakshongas#9893 🕹
Need a little more help? Discord : Yakshongas#9893 🕹
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Sorry, I meant left windows key + D, not CTRL + DYakshongas wrote: ↑01 Aug 2020, 07:48Of course! like this:
Code: Select all
{LControl Down}d{LControl Up}
- Yakshongas
- Posts: 590
- Joined: 21 Jan 2020, 08:41
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Then change LControl to LWin
Please mark your topics as solved if you don't need any further help.
Need a little more help? Discord : Yakshongas#9893 🕹
Need a little more help? Discord : Yakshongas#9893 🕹
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Thank you so much man, you don't know how much I appreciate it!
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Solved, moderators can archive or delete this.
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
Thank you, but no. We don't delete solved topics (and there is no archive for them anyway). That would be contrary to the purpose of a support forum.
Apart from that, there are different users involved in this topic - it wouldn't be right to delete their posts without reason.
If you don't want to get notifications for this topic, just unsubscribe to it (see link at the top).
Re: GTA SA (SA:MP) ANTI-AFK SCRIPT
I don't mind if the topic gets deleted or archived, but it's also okay from my aspect of view for the topic to stay without being deleted or archived.
Who is online
Users browsing this forum: No registered users and 68 guests