mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-06 01:23:35 +08:00
76afd97185
* lua api: add globals.get_uint and globals.set_uint * lua doc: remove duplicate function check as we can overload so it doesn't make sense * lua doc gen: add support for parsing the tabs enum * gui: custom lua tabs don't have a `func` rendering function but can still have elements to draw * lua doc: update generated doc * chore: code style * chore: minor spelling mistake * chore: code style * gui_service: add runtime removal of tabs * refactor: make it so that it's less likely defining tabs and their translation key in a wrong way. * lua api: ability to add custom tabs to the gui from lua
1.3 KiB
1.3 KiB
Table: memory
Table containing helper functions related to process memory.
Functions (5)
scan_pattern(pattern)
Scans the specified memory pattern within the "GTA5.exe" module and returns a pointer to the found address.
-
Parameters:
pattern
(string): byte pattern (IDA format)
-
Returns:
pointer
: A pointer to the found address.
Example Usage:
pointer = memory.scan_pattern(pattern)
handle_to_ptr(entity)
-
Parameters:
entity
(number): script game entity handle
-
Returns:
pointer
: A rage::CDynamicEntity pointer to the script game entity handle
Example Usage:
pointer = memory.handle_to_ptr(entity)
ptr_to_handle(mem_addr)
-
Parameters:
mem_addr
(pointer): A rage::CDynamicEntity pointer.
-
Returns:
number
: The script game entity handle linked to the given rage::CDynamicEntity pointer.
Example Usage:
number = memory.ptr_to_handle(mem_addr)
allocate(size)
-
Parameters:
size
(integer): The number of bytes to allocate on the heap.
-
Returns:
pointer
: A pointer to the newly allocated memory.
Example Usage:
pointer = memory.allocate(size)
free(ptr)
- Parameters:
ptr
(pointer): The pointer that must be freed.
Example Usage:
memory.free(ptr)