View previous topic :: View next topic |
Author |
Message |
cancandodo Advanced Cheater Reputation: 0
Joined: 09 Mar 2012 Posts: 62
|
Posted: Thu Mar 01, 2018 6:48 pm Post subject: how to write a lua to use combination key? |
|
|
i know use just only one hotkey need write lua like this
===============
function main()
if isKeyPressed(VK_U) then
writeInteger(Address, Value)
else
writeInteger(Address, Value)
end
if isKeyPressed(VK_J) then
writeInteger(Address, Value)
else
writeInteger(Address, Value)
end
end
t = createTimer(nil, false) -- create a Timer object and assign it to variable t
timer_onTimer(t, main) -- When the timer ticks, call the function main
timer_setInterval(t, 50) -- Sets the tickrate of the timer in milliseconds
timer_setEnabled(t, true) -- Turns the timer on
=================
but if i need use ctrl+F1 to run script,i have no idea
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Fri Mar 02, 2018 1:39 am Post subject: |
|
|
why don't you use createHotkey?
anyhow, VK_CONTROL is the ctrl key code, so just check for control and f1 at the same time
_________________
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 |
|
|
cancandodo Advanced Cheater Reputation: 0
Joined: 09 Mar 2012 Posts: 62
|
Posted: Mon Apr 02, 2018 7:45 am Post subject: |
|
|
Dark Byte wrote: | why don't you use createHotkey?
anyhow, VK_CONTROL is the ctrl key code, so just check for control and f1 at the same time |
thanks!
|
|
Back to top |
|
|
|