HelpOn/off Cheats trainer

Posts 1–8 of 8 · Page 1 of 1
On/off Cheats trainer
Hi people, im making a trainer for Black Ops2. Right now I know how to assign a hotkey to the cheat, but i don't know how to make it on/off!

Someone who can help me? :C
Check for the hotkey. If the hotkey is pressed:
Code:
booleanName = not booleanName
then patch the addy's accordingly.
Could use a hook to look for key presses.

Or when a button is pressed, bool value is changed.
I haven't programmed in a little but something like this works.

Add this code into where the effect is.
so something like

form1.txt = 0

private sub test1

if form1.txt >0 then
msgbox"hack on"
form1.txt=0
elsif msgbox"hack off" & form1.txt=1

end sub
Quote Originally Posted by Girlz Rule View Post
I haven't programmed in a little but something like this works.

Add this code into where the effect is.
so something like

form1.txt = 0

private sub test1

if form1.txt >0 then
msgbox"hack on"
form1.txt=0
elsif msgbox"hack off" & form1.txt=1

end sub
I think having a message box pop up in game would be slightly irritating!
Quote Originally Posted by Girlz Rule View Post
I haven't programmed in a little but something like this works.

Add this code into where the effect is.
so something like

form1.txt = 0

private sub test1

if form1.txt >0 then
msgbox"hack on"
form1.txt=0
elsif msgbox"hack off" & form1.txt=1

end sub
You are the reason I finally changed my password(90 days rule) after like a month...

Just wanted to tell you...this is the greatest code of mankind.

@OP Either use a timer or a boolean with a sub that runs in a background thread...
Heres the code for timer tick that has an interval of 1000 (around)


Dim decide as boolean = true
Dim off As Boolean
if decide = false then 'lets same key do same thing
off = GetAsyncKeyState(Keys.F3) 'this will make f3 turn it on/off
If off = True Then
decide = true
'STOP COMMAND HERE
else
'START COMMAND HERE
decide = false
End If
Can make trainer, but can't check key state - odd?

papadoo had good suggestion: add a timer to the form and in it's tick event check for keypress -- if pressed, toggle the hack.

I actually recommend having a button to enable the hack (and the timer) and then use the timer /keypress check to disable it -- if the timer interval is too high, you have to hold the key down longer (not really* a problem, but sometimes you just press the button fast expecting it to work, and it won't), and if it's too short, it could actually run several times for 1 key press and enable/disable several times really fast.

cmdOn_click()
if hack.CurrentlyOn = falseThen
hack.Enable/Start/W.e.
timerKeys.enabled = true
cmdOn.enabled = false
end sub

timer1_tick()
if getasynckeystate = yourKey then
hack.disable()
cmdOn.enabled = true 'so user can start hack again
timer1.enabled = false 'since timer1's only purpose is to stop the hack, if hack is currently disabled, the timer doesn't need to be on.
end sub

instead of button.enabled = false, maybe updating a label is better way to say "hack is on"
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?