View previous topic :: View next topic |
Author |
Message |
darkgames How do I cheat? Reputation: 0
Joined: 22 Jan 2018 Posts: 4
|
Posted: Mon Jan 22, 2018 5:21 pm Post subject: show message "hack failed to enable" in lua |
|
|
Hi, i wanted to ask how can I show message as "Hack Failed to Enable" in lua while toggling assemble from addresslist.
for example the toggling script is this:
i = 0
addresslist=getAddressList()
memrec=addresslist_getMemoryRecordByDescription(addresslist, testing)
if( i == 0 ) then
--ENABLE CHEAT SCRIPT
memoryrecord_freeze(memrec)
showMessage("ENABLED")
end
i = (i +1)%2
return true
now how can I make it show "Hack Failed to Enable" if it is not toggled.
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Mon Jan 22, 2018 5:46 pm Post subject: |
|
|
Is this in a memory record script or the table Lua script?
And is there a reason for using an integer to enable and disable the script (and not a boolean), because the first time it enable, then disable, then disable, then enable, and enabled again.
Example:
Code: | for i = 0, 20 do
i = (i +1)%2
print(i)
end |
And running this will output this:
Quote: | 1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
|
_________________
Last edited by TheyCallMeTim13 on Mon Jan 22, 2018 5:47 pm; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Mon Jan 22, 2018 5:47 pm Post subject: |
|
|
something like this:
Code: |
memrec.Active=true
if (memrec.Active==false) then
showMessage('Hack Failed to Enable')
end
|
_________________
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 |
|
|
darkgames How do I cheat? Reputation: 0
Joined: 22 Jan 2018 Posts: 4
|
Posted: Mon Jan 22, 2018 6:29 pm Post subject: |
|
|
Thanks Tim and DarkByte helped me a lot.
It worked this way, the code is below maybe if others are looking for this function.
Code: | memrec.Active=true
if (memrec.Active==true) then
showMessage('Hack Enabled')
end
if (memrec.Active==false) then
showMessage('Hack Failed to Enable')
end |
|
|
Back to top |
|
|
|