View previous topic :: View next topic |
Author |
Message |
HyberCode Cheater Reputation: 0
Joined: 17 Feb 2016 Posts: 40
|
Posted: Thu Aug 18, 2016 11:50 am Post subject: if the value changing statement |
|
|
hello
so i want to do if statement in my trainer if the value changing then don't add it to saved addresses ... else add it so i can use later
Code: | for i in pairs(MyCoordAddresses) do
if readFloat(i,thevalueischanging) then
don't add it
else
add it
end |
ofc i want it in for loop so i check in every value
i hope i get good answer , thanks
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Thu Aug 18, 2016 11:55 am Post subject: |
|
|
Code: | for i,v in pairs(MyCoordAddresses) do
if readFloat(i) == v then
-- add it
else
-- don't add it
end
end |
|
|
Back to top |
|
|
HyberCode Cheater Reputation: 0
Joined: 17 Feb 2016 Posts: 40
|
Posted: Thu Aug 18, 2016 12:17 pm Post subject: |
|
|
Zanzer wrote: | Code: | for i,v in pairs(MyCoordAddresses) do
if readFloat(i) == v then
-- add it
else
-- don't add it
end
end |
|
great but how can i give (v) an address from the debugger
or
simply any value that in the debugger does change don't add it
else
add it
sorry and thank you
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Thu Aug 18, 2016 1:56 pm Post subject: |
|
|
Code: | saved_addresses = {}
debug_setBreakpoint(0x12345678, 1, bptExecute, function()
local address = ECX
local value = saved_addresses[address]
if value == nil then
saved_addresses[address] = readInteger(address)
else
if value ~= false then
local new_value = readInteger(address)
if value ~= new_value then
saved_addresses[address] = false
end
end
end
return 1
end) |
|
|
Back to top |
|
|
|