View previous topic :: View next topic |
Author |
Message |
Filipe_Br Master Cheater Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Thu Aug 25, 2016 2:16 pm Post subject: Customize hotkeys |
|
|
How can I put a CEEdit in my trainer for the user to choose your hotkeys?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Thu Aug 25, 2016 2:41 pm Post subject: |
|
|
set it to read only, and in the OnKeyDown event record the key to a table of max 5 entries (key is a virtual key code)
then build a string using convertKeyComboToString(key1,...) to display the keys the user pressed
_________________
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 |
|
|
Filipe_Br Master Cheater Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Thu Aug 25, 2016 3:14 pm Post subject: Re: Customize hotkeys |
|
|
I tried this and it did not work as I wanted
Code: |
function CEEdit1KeyDown(sender, key)
UDF1.CEEdit1.text=''
a=convertKeyComboToString(VK_V,VK,I)
UDF1.CEEdit1.text=tostring(a)
return key
end
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Thu Aug 25, 2016 3:46 pm Post subject: |
|
|
Code: |
function CEEdit1KeyDown(sender, key)
if #CEEdit1Keys>=5 then return 0 end --max keys reached
local i
for i=1, #CEEdit1Keys do
if CEEdit1Keys[i]==key then return 0 end --already in the list
end
table.insert(CEEdit1Keys, key)
UDF1.CEEdit1.text=tostring(convertKeyComboToString(CEEdit1Keys))
return 0
end
function CEButton1Click(sender)
CEEdit1Keys={}
UDF1.CEEdit1.text=''
UDF1.CEEdit1.SetFocus()
end
CEButton1Click(nil)
|
Description: |
|
Download |
Filename: |
example.ct |
Filesize: |
1019 Bytes |
Downloaded: |
597 Time(s) |
_________________
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 |
|
|
|