FreeER Grandmaster Cheater Supreme Reputation: 53 Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sun Jan 14, 2018 4:21 pm Post subject: |
|
|
use
Code: | [ENABLE]
{$lua}
-- don't run when editing script
if syntaxcheck then return end
-- ignore hotkey stuff if not trigged by first hotkey
if not (memrec.HotkeyCount > 0 and memrec.Hotkey[0].Keys[1] and isKeyPressed(memrec.Hotkey[0].Keys[1])) then return end
local t = createTimer()
t.Interval = 100
t.OnTimer = function(t)
-- sanity check to prevent errors
if not (memrec.HotkeyCount > 0 and memrec.Hotkey[0].Keys[1]) then
t.destroy()
return
end
-- if key not pressed then disable script
if not isKeyPressed(memrec.Hotkey[0].Keys[1]) then
memrec.Active = false
t.destroy()
end
end
{$asm}
// ... whatever enable code
[DISABLE]
// ... whatever disable code
|
as your script and replace
"// ... whatever enable code" with whatever code you have for the enable section and "// ... whatever disable code " with whatever code you have for the disable section.
|
|