View previous topic :: View next topic |
Author |
Message |
Redogg Cheater
Reputation: 0
Joined: 16 Feb 2015 Posts: 27
|
Posted: Mon Sep 21, 2015 10:33 am Post subject: lua hotkey wont work |
|
|
ay
tried to use this code to hotkey my address to change the value to 1 when i press f7 but the hotkey wont work
Code: | function LUApasser()
if isKeyPressed(VK_F7) then
LUAsetone = 1
local LUA = readInteger("server.CreateInterface+302140")
writeInteger("server.CreateInterface+302140, server.CreateInterface+302140",LUAsetone)
end
end |
help?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 467
Joined: 09 May 2003 Posts: 25705 Location: The netherlands
|
Posted: Mon Sep 21, 2015 11:22 am Post subject: |
|
|
is LUApasser called constantly using a timer or a thread in an infinite loop? Otherwise, this won't do much
try using createHotkey instead
_________________
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 |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Sep 21, 2015 11:26 am Post subject: |
|
|
I don't believe writeInteger will accept a comma delimited list of addresses either.
If you want to change two addresses, make two separate writeInteger calls.
...although, both of the ones you listed are the same address
|
|
Back to top |
|
 |
Redogg Cheater
Reputation: 0
Joined: 16 Feb 2015 Posts: 27
|
Posted: Mon Sep 21, 2015 2:55 pm Post subject: |
|
|
Dark Byte wrote: | is LUApasser called constantly using a timer or a thread in an infinite loop? Otherwise, this won't do much
try using createHotkey instead |
yea.. i forgot about the timer but its still wont work
Code: | timer = createTimer(nil,true)
timer_setInterval(timer,100)
function LUApasser()
if isKeyPressed(VK_F7) then
LUAsetone = 1
local LUA = readInteger("server.CreateInterface+302140")
writeInteger("server.CreateInterface+302140, server.CreateInterface+302140",LUAsetone)
end
end
timer_onTimer(timer,LUApasser)
timer_setEnabled(t, true) |
i tried to use createHotkey, but its wont work too
when i add the hotkey its always says something about access error
but whats funny about it, when i press f8(my hotkey) in cheat engine its working. when i save my trainer as .exe its wont work
Description: |
|
Filesize: |
924.51 KB |
Viewed: |
16365 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 467
Joined: 09 May 2003 Posts: 25705 Location: The netherlands
|
Posted: Mon Sep 21, 2015 5:03 pm Post subject: |
|
|
You are mixing several things together
First off, there is an f8 hotkey in the list. That's only possible with cheat table entries with such a hotkey, so why use a lua script like that? (if you delete the entry afterwards you'll get an access violation yes)
That writeInteger line is just wrong and won't work.
And don't save your trainer as hl2.exe , if you do that your trainer won't work
_________________
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 |
|
 |
Redogg Cheater
Reputation: 0
Joined: 16 Feb 2015 Posts: 27
|
Posted: Mon Sep 21, 2015 5:28 pm Post subject: |
|
|
Dark Byte wrote: | You are mixing several things together
First off, there is an f8 hotkey in the list. That's only possible with cheat table entries with such a hotkey, so why use a lua script like that? (if you delete the entry afterwards you'll get an access violation yes)
That writeInteger line is just wrong and won't work.
And don't save your trainer as hl2.exe , if you do that your trainer won't work |
no i posted the screenshot just to show you what happened when i use the add hokey button
and hl2.exe is the game that i want to use my trainer for
|
|
Back to top |
|
 |
Rydian Grandmaster Cheater Supreme
Reputation: 31
Joined: 17 Sep 2012 Posts: 1358
|
Posted: Mon Sep 21, 2015 5:51 pm Post subject: |
|
|
... and don't save it as that or the trainer won't work because it'll search for "hl2.exe" and it searches starting with the most recently-run programs.
So it'll find itself, not the game.
_________________
|
|
Back to top |
|
 |
Redogg Cheater
Reputation: 0
Joined: 16 Feb 2015 Posts: 27
|
Posted: Mon Sep 21, 2015 5:58 pm Post subject: |
|
|
Rydian wrote: | ... and don't save it as that or the trainer won't work because it'll search for "hl2.exe" and it searches starting with the most recently-run programs.
So it'll find itself, not the game. |
i mean i dont get it if i will not use hl2.exe so the trainer will not get attached to the game or i have to open the game first and then the trainer
|
|
Back to top |
|
 |
Rydian Grandmaster Cheater Supreme
Reputation: 31
Joined: 17 Sep 2012 Posts: 1358
|
Posted: Mon Sep 21, 2015 7:11 pm Post subject: |
|
|
He means don't name the trainer itself "hl2.exe" when you save it.
_________________
|
|
Back to top |
|
 |
Redogg Cheater
Reputation: 0
Joined: 16 Feb 2015 Posts: 27
|
Posted: Mon Sep 21, 2015 7:27 pm Post subject: |
|
|
Rydian wrote: | He means don't name the trainer itself "hl2.exe" when you save it. |
huh? i dont, i never saved it as hl2.exe
Dark Byte imma try again in the morning to use createHotkey(fac , hotkey) as you said
|
|
Back to top |
|
 |
Redogg Cheater
Reputation: 0
Joined: 16 Feb 2015 Posts: 27
|
Posted: Tue Sep 22, 2015 9:32 am Post subject: |
|
|
i dont know if im fag or what but when i press my hotkey im getting"Error:attempt to call a nil value"
Code: | createHotkey(LUApasser , VK_F7)
timer = createTimer(nil,true)
timer_setInterval(timer,100)
function LUApasser()
local LUA = readInteger("server.CreateInterface+302140")
writeInteger("server.CreateInterface+302140", 1)
end
timer_onTimer(timer,LUApasser)
timer_setEnabled(t, true) |
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 467
Joined: 09 May 2003 Posts: 25705 Location: The netherlands
|
Posted: Tue Sep 22, 2015 9:59 am Post subject: |
|
|
call createHotkey after defining the function, not before
_________________
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 |
|
 |
Redogg Cheater
Reputation: 0
Joined: 16 Feb 2015 Posts: 27
|
Posted: Tue Sep 22, 2015 12:31 pm Post subject: |
|
|
Dark Byte wrote: | call createHotkey after defining the function, not before |
thanks bro i got it, its working
|
|
Back to top |
|
 |
|