G6NK How do I cheat?
Reputation: 0
Joined: 20 May 2022 Posts: 2
|
Posted: Fri May 20, 2022 5:52 pm Post subject: using if statements in timer |
|
|
Using this code does not work when i add conditions. results with access violation. what is wrong?
| Code: |
[enable]
{$lua}
t_saveposp1zm = createTimer()
t_saveposp1zm.setInterval(10)
t_saveposp1zm.onTimer = function()
p1yzm = '"game.exe"+fffA00+4'
zycomp = '"game.exe"+fff100'
if readString(zycomp) == zn then
yposp1zm = readFloat(p1yzm) + 150
elseif readString(zycomp) == zs then
yposp1zm = readFloat(p1yzm) - 150
writeFloat('"game.exe"+fffAB0+4',yposp1zm)
end
{$asm}
[disable]
{$lua}
t_saveposp1zm.destroy()
{$asm}
|
[[[[[[[[[[[[[ edit: ]]]]]]]]]]]]]]]
i figured it out
| Code: |
[enable]
{$lua}
t_saveposp1zm = createTimer()
t_saveposp1zm.setInterval(10)
t_saveposp1zm.onTimer = function()
p1yzm = '"game.exe"+fffA00+4'
zycomp = '"game.exe"+fff100'
if readString(zycomp) == "zn" then
yposp1zm = readFloat(p1yzm) + 150
elseif readString(zycomp) == "zs" then
yposp1zm = readFloat(p1yzm) - 150
else
writeFloat('"game.exe"+fffAB0+4',p1yzm)
end
writeFloat('"game.exe"+fffAB0+4',yposp1zm)
end
{$asm}
[disable]
{$lua}
t_saveposp1zm.destroy()
{$asm}
|
_________________
-- yeet |
|