memory
Lets you read and write memory.
Methods
memory.readFloat(address)
memory.readFloat(address)
address
- The address you want to read from
Returns the value of the float at the given address.
Example:
local yaw = memory.readFloat(0x00C84FDC)
print(string.format("Value at 0x00C84FDC -> %.2f", yaw))
memory.writeFloat(address, value)
memory.writeFloat(address, value)
address
- The address you want to write tovalue
- The value you want to write
Writes the value at the given address.
Example:
memory.writeFloat(0x00C84FDC, 90.0) --write 90 to yaw address
memory.readInt(address)
memory.readInt(address)
address
- The address you want to read from
Returns the value of the int at the given address.
Example:
local something = memory.readInt(0x400050)
memory.writeInt(address, value)
memory.writeInt(address, value)
address
- The address you want to write tovalue
- The value you want to write
Writes the value at the given address.
Example:
memory.writeInt(0xFFFFFF, 120)
memory.readBytes(address, count)
memory.readBytes(address, count)
address
- The address you want to write tovalue
- The value you want to write
Reads an amount of bytes specified by count from the given address. Will return a list of bytes.
Example:
local bytes = memory.readBytes(0x40EBB0, 7)
-- Returns {0x83, 0xEC, 0x20, 0xF6, 0x47, 0x0C, 0x08
memory.writeBytes(address, bytes)
memory.writeBytes(address, bytes)
address
- The address you want to write the bytes tobytes
- The byes you want to write
Writes the given bytes to the address. Page protection is taken care of for you.
Example:
local bytes = {0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90}
local bytes = memory.writeBytes(0x457D29, bytes)
-- Recoil is now patched, giving us norecoil
memory.findSignature(pattern, [module])
memory.findSignature(pattern, [module])
pattern
- The byte pattern to try to find. Wildcards in the form of ? are allowed.module
- The module in which to search by name. Optional. Defaults to iw3mp.exe!
Try find the given byte pattern and returns the address if found, 0 otherwise.
Example:
local signature = "8B ? ? ? ? ? ? ? 8B ? ? ? ? E8 ? ? ? ? 83 ? ? F7 ? ? ? ? ? ?"
local pmovesingle = memory.findSignature(signature)
print(string.format("PmoveSingle @ 0x%X", pmovesingle))
-- Prints the address of the pmovesingle engine function
Last updated