| View previous topic :: View next topic |
| Author |
Message |
scared How do I cheat?
Reputation: 0
Joined: 27 Dec 2022 Posts: 5
|
Posted: Tue Dec 27, 2022 9:07 am Post subject: Changing pointer values in lua |
|
|
i am trying to put a pointer's speed hack in a trackbar and make it customizable. i'm really stuck on this, this is the code i used for trying to assign a pointer value for every position of the trackbar:
| Code: | function CETrainerTrackBar1Change(sender)
if sender.Position == 0 then
writeFloat(0x1BCB5DAC,8)
elseif sender.Position == 1 then
writeFloat(0x1BCB5DAC,20)
elseif sender.Position == 2 then
writeFloat(0x1BCB5DAC,30)
elseif sender.Position == 3 then
writeFloat(0x1BCB5DAC,40)
elseif sender.Position == 4 then
writeFloat(0x1BCB5DAC,50)
elseif sender.Position == 5 then
writeFloat(0x1BCB5DAC,60
elseif sender.Position == 6 then
writeFloat(0x1BCB5DAC,70)
elseif sender.Position == 7 then
writeFloat(0x1BCB5DAC,80)
elseif sender.Position == 8 then
writeFloat(0x1BCB5DAC,90)
elseif sender.Position == 9 then
writeFloat(0x1BCB5DAC,100)
elseif sender.Position == 10 then
writeFloat(0x1BCB5DAC,110)
else
writeFloat(0x1BCB5DAC,8)
end
end |
also the pointer "1BCB5DAC" changes everytime so i don't know what to put to make it working
| Description: |
|
| Filesize: |
112.88 KB |
| Viewed: |
1710 Time(s) |

|
|
|
| Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Tue Dec 27, 2022 11:16 am Post subject: |
|
|
Try this:
| Code: |
function CETrainerTrackBar1Change(sender)
local address = getAddressSafe(0x1BCB5DAC)
local position = sender.Position
if position == 0 then writeFloat(address, 8) return end
if (position >= 1) and (position <= 10) then
writeFloat(address, (position + 1) * 10)
end
end
|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25835 Location: The netherlands
|
Posted: Tue Dec 27, 2022 8:41 pm Post subject: |
|
|
memoryrecord.Value=newvalue
_________________
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 |
|
 |
scared How do I cheat?
Reputation: 0
Joined: 27 Dec 2022 Posts: 5
|
Posted: Mon Jan 02, 2023 11:13 am Post subject: |
|
|
| LeFiXER wrote: | Try this:
| Code: |
function CETrainerTrackBar1Change(sender)
local address = getAddressSafe(0x1BCB5DAC)
local position = sender.Position
if position == 0 then writeFloat(address, 8) return end
if (position >= 1) and (position <= 10) then
writeFloat(address, (position + 1) * 10)
end
end
|
| thank you
|
|
| Back to top |
|
 |
|