| View previous topic :: View next topic |
| Author |
Message |
Stacktrace Expert Cheater
Reputation: 1
Joined: 04 Jul 2015 Posts: 105
|
Posted: Fri Sep 25, 2015 4:02 pm Post subject: When using the Togglebox button in a trainer.. |
|
|
| When using the Togglebox button in a trainer, let's say once I click it it'll set a breakpoint on an address, I've done that. But how would I revert the breakpoint when clicking on the button again? Like disable, revert the script that happens once it's clicked... help
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Sep 25, 2015 9:04 pm Post subject: |
|
|
| Code: | if checkbox.Checked then
-- enable
else
-- disable
end |
| Code: | if myvar then
-- disable
else
-- enable
myvar = true
end |
|
|
| Back to top |
|
 |
Stacktrace Expert Cheater
Reputation: 1
Joined: 04 Jul 2015 Posts: 105
|
Posted: Sat Sep 26, 2015 8:22 pm Post subject: |
|
|
In fact, I meant a toggle button not the checkbox. The button you click on and it'll appear grey till you click it again.
The script you listed didn't work either way.
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Sep 26, 2015 11:36 pm Post subject: |
|
|
If you're executing the function with each click, this script would work.
| Code: | if myvar then
-- disable
myvar = false
else
-- enable
myvar = true
end |
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25815 Location: The netherlands
|
Posted: Sun Sep 27, 2015 3:59 am Post subject: |
|
|
this works just fine in the onChange event
| Code: |
if dumpy.flufflewufflemegabox.Checked then
print("down")
else
print("up")
end
|
You do have to change the objectname. (e.g if you never rename things, then instead of "dumpy" use UDF1, and instead of flufflewufflemegabox use CEToggleBox1 )
or use the sender parameter instead
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|