It finds all pointers pointing to your address. To use it you need to load the address(es) you want to perform the pointer search on in the result list.
gg.loadResults({{address = grp[1].address + 0x4, flags = gg.TYPE_DWORD}})
Adds 4 bytes to the address, 0x9865E5B0 + 0x4 = 0x9865E5B4 and then loads it in the result list in data type dword.
gg.searchPointer(0)
Does the pointer search in the given ranges. Basically it's like doing: gg.searchNumber(9865E5B4h, gg.TYPE_DWORD)
You get a few results.
I dunno how gameguardian does it behind the hood but now i use gg.searchPointer(0) again because i want to perform pointer search on each of those addresses...that's why a second time.
I have now more results because there are a lot of pointers pointing to those few addresses from previous screenshot. Now i need to filter them out because the health value was one more pointer search away, and the address to pointer search is in this result list. One of those addresses had 4 bytes above it a value 1.0F. That's the same value i asked you to search using 256F;1.0F::16. Sadly it returned no results for you. But the 1.0F value is located 4 bytes above one of those addresses in the result list. So i used that for filter out all these values and to get only 1 address left.
local t = gg.getResults(gg.getResultsCount())
local sensitivity = {}
for i, v in ipairs(t) do
sensitivity[i] = {address = v.address - 0x4, flags = gg.TYPE_FLOAT}
end
sensitivity = gg.getValues(sensitivity)
subtracted 0x4 from all the addresses in the result list and stored it in a new table(sensitivity) with data type float.
local healthPointer = {}
for i = 1, #sensitivity do
if sensitivity[i].value == 1.0 then
healthPointer[i] = {address = t[i].address, flags = gg.TYPE_DWORD}
end
end
Checked which address of the table sensitivity contained the value 1.0F using iteration and if it found it should store the address that is 4 bytes under it in the table healthPointer and then load it in the result list using:
gg.loadResults(healthPointer)
It found a match and loaded the address in result list:
Script performs pointer search again.
local res = gg.getResults(1)
local health = {[1] = {address = res[1].address + 0x4, flags = gg.TYPE_FLOAT, name = "Health"}}
Will get 1 result, the health value is 4 bytes under that address...so i add 4 bytes to the address and store in the table health and gave it a name.
gg.addListItems(health)
gg.loadResults(health)
Add the table health in the saved list.
And loads it as well in the result list.
Adviced to check out the Lua scripting documentation.