View previous topic :: View next topic |
Author |
Message |
guy960915 Expert Cheater Reputation: 2
Joined: 17 Sep 2007 Posts: 168
|
Posted: Sun Aug 11, 2019 5:40 am Post subject: HELP CE default trainer Toggle Button |
|
|
need help ,
i want to make the toggle button (#1) enable a cheat (#2)
what do i write on (#3)
i got these samples, but not what I'm looking for,
getAddressList().getMemoryRecordByDescription('').Active = sender.checked
writeInteger('',) or memoryrecord_freeze( )
[/img]
Description: |
|
Filesize: |
32.17 KB |
Viewed: |
2621 Time(s) |
|
|
|
Back to top |
|
|
guy960915 Expert Cheater Reputation: 2
Joined: 17 Sep 2007 Posts: 168
|
Posted: Sat Aug 31, 2019 8:17 am Post subject: |
|
|
is this even possible?
already searched, nothing about this.
i just want to add a toggle button to the existing cheat table.
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sat Aug 31, 2019 9:47 am Post subject: |
|
|
look what code was generated for that script in the trainer's lua script and either copy or call it.
_________________
|
|
Back to top |
|
|
guy960915 Expert Cheater Reputation: 2
Joined: 17 Sep 2007 Posts: 168
|
Posted: Sat Aug 31, 2019 9:52 pm Post subject: |
|
|
this is part of the generated
Code: |
function onPostHotkey0(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=Hotkey.Owner
local isActive=memrec.Active --get the state after the hotkey got triggered
CETrainer.CHEAT0.setActive(isActive) --gui update, nothing else
if gPlaySoundOnAction then
if isActive then
playSound(gActivateSound)
else
playSound(gDeactivateSound)
end
end
end
memrec45_hotkey0.onPostHotkey=onPostHotkey0
|
how do i call this?
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sun Sep 01, 2019 4:27 pm Post subject: |
|
|
onPostHotkey0(memrec45_hotkey0) or memrec45_hotkey0.doHotkey() (should call both OnHotkey and OnPostHotkey, if set)
_________________
|
|
Back to top |
|
|
guy960915 Expert Cheater Reputation: 2
Joined: 17 Sep 2007 Posts: 168
|
Posted: Tue Sep 03, 2019 12:31 pm Post subject: |
|
|
than you,
memrec45_hotkey0.doHotkey()
this worked,
|
|
Back to top |
|
|
|