[NEWCOMER] First self-made script to automate an external GTA V money hack

Post gaming related scripts
ozgur31
Posts: 1
Joined: 03 Mar 2018, 01:52

[NEWCOMER] First self-made script to automate an external GTA V money hack

03 Mar 2018, 02:24

Hey there, let me first introduce myself.
I'm new, very new to the forums and I go by Ozgur31/Ozzy_OD, whatever.
I'm an IT-nerd who specializes in hardware and absolutely SUCKS at software/coding etc.
I'm a nice guy and just wish to be a positive happy go lucky person throughout the rest of my existence. :dance:

So I made my first script to automate a certain action, let me explain.
I have this program that gives me 100k in GTA V once a minute every time I press F9.
I thought this was tedious to do manually and wanted to automate the process so I compiled my first script to do this for me instead!

thoughts? tips? any feedback would be appreciated!
Spoiler
Rangerbot
Posts: 34
Joined: 02 Mar 2018, 10:33

Re: [NEWCOMER] First self-made script to automate an external GTA V money hack

13 May 2018, 04:30

a few small critiques
1. a necessary habit is code indentation, whether you follow general rules or keep it cozy
2. use code tags if you can for legibility when posting

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



if you use {} braces after a hotkey definition then it will only run what is in the chunk (no return necessary)
however if you have no braces it will treat is like a goto label and run from that point (return necessary)

edit: thanks for the note :)
Last edited by Rangerbot on 14 May 2018, 04:05, edited 2 times in total.
User avatar
gregster
Posts: 1346
Joined: 30 Sep 2013, 06:48

Re: [NEWCOMER] First self-made script to automate an external GTA V money hack

13 May 2018, 11:48

Rangerbot wrote:if you use {} braces after a hotkey definition then it will only run what is in the chunk (no return necessary)

I am afraid, this is wrong. { } blocks have no effect in a hotkey definition (as long as they don't belong to a loop, if statement etc.). You will still need a return to end the hotkey definition.
Compare the docs:
Although blocks can be used anywhere, currently they are only meaningful when used with functions, Else, Loop, or an IF-type command such as IfEqual or IfWinExist.
(https://autohotkey.com/docs/commands/Block.htm)

To confirm, try (just hit a ):

Code: [Select all] [Download] GeSHi © Codebox Plus

a::
{
msgbox inside the block
}
msgbox block party
; return could help here

b::
msgbox Oh, b...locks! Script will exit...
ExitApp
(same effect with your soundbeeps above, Rangerbot)
Just always use a return at the end of a multi-line hotkey definition. After a one-liner, like a::msgbox, it can be left out without problem, though.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 5 guests