# Table of Contents - [Practical Information | Lua Documentation](#practical-information-lua-documentation) - [API Reference | Lua Documentation](#api-reference-lua-documentation) - [vec2 | Lua Documentation](#vec2-lua-documentation) - [g_lua | Lua Documentation](#g-lua-lua-documentation) - [Classes | Lua Documentation](#classes-lua-documentation) - [vec3 | Lua Documentation](#vec3-lua-documentation) - [unregister | Lua Documentation](#unregister-lua-documentation) - [register | Lua Documentation](#register-lua-documentation) - [load_lua | Lua Documentation](#load-lua-lua-documentation) - [g_logger | Lua Documentation](#g-logger-lua-documentation) - [scan_pattern | Lua Documentation](#scan-pattern-lua-documentation) - [g_memory | Lua Documentation](#g-memory-lua-documentation) - [log_info | Lua Documentation](#log-info-lua-documentation) - [free | Lua Documentation](#free-lua-documentation) - [allocate | Lua Documentation](#allocate-lua-documentation) - [get_base_address | Lua Documentation](#get-base-address-lua-documentation) - [write_short | Lua Documentation](#write-short-lua-documentation) - [write_float | Lua Documentation](#write-float-lua-documentation) - [g_gui | Lua Documentation](#g-gui-lua-documentation) - [is_open | Lua Documentation](#is-open-lua-documentation) - [cos | Lua Documentation](#cos-lua-documentation) - [close | Lua Documentation](#close-lua-documentation) - [write_long_long | Lua Documentation](#write-long-long-lua-documentation) - [write_double | Lua Documentation](#write-double-lua-documentation) - [tan | Lua Documentation](#tan-lua-documentation) - [add_toast | Lua Documentation](#add-toast-lua-documentation) - [add_input_string | Lua Documentation](#add-input-string-lua-documentation) - [register_scripted_game_event_hook | Lua Documentation](#register-scripted-game-event-hook-lua-documentation) - [sin | Lua Documentation](#sin-lua-documentation) - [write_int | Lua Documentation](#write-int-lua-documentation) - [read_int | Lua Documentation](#read-int-lua-documentation) - [unregister_hook | Lua Documentation](#unregister-hook-lua-documentation) - [register_wndproc_hook | Lua Documentation](#register-wndproc-hook-lua-documentation) - [read_short | Lua Documentation](#read-short-lua-documentation) - [open | Lua Documentation](#open-lua-documentation) - [add_input_float | Lua Documentation](#add-input-float-lua-documentation) - [read_byte | Lua Documentation](#read-byte-lua-documentation) - [write_string | Lua Documentation](#write-string-lua-documentation) - [add_button | Lua Documentation](#add-button-lua-documentation) - [toggle | Lua Documentation](#toggle-lua-documentation) - [read_string | Lua Documentation](#read-string-lua-documentation) - [register_D3D_hook | Lua Documentation](#register-d3d-hook-lua-documentation) - [add_input_int | Lua Documentation](#add-input-int-lua-documentation) - [yield | Lua Documentation](#yield-lua-documentation) - [rip | Lua Documentation](#rip-lua-documentation) - [read_double | Lua Documentation](#read-double-lua-documentation) - [g_util | Lua Documentation](#g-util-lua-documentation) - [g_math | Lua Documentation](#g-math-lua-documentation) - [joaat | Lua Documentation](#joaat-lua-documentation) - [get_menu_version | Lua Documentation](#get-menu-version-lua-documentation) - [write_byte | Lua Documentation](#write-byte-lua-documentation) - [is_session_started | Lua Documentation](#is-session-started-lua-documentation) - [trigger_script_event | Lua Documentation](#trigger-script-event-lua-documentation) - [read_long_long | Lua Documentation](#read-long-long-lua-documentation) - [play_wav_file | Lua Documentation](#play-wav-file-lua-documentation) - [read_float | Lua Documentation](#read-float-lua-documentation) - [get_selected_player | Lua Documentation](#get-selected-player-lua-documentation) - [time_ms | Lua Documentation](#time-ms-lua-documentation) - [g_os | Lua Documentation](#g-os-lua-documentation) - [finger_print | Lua Documentation](#finger-print-lua-documentation) - [time | Lua Documentation](#time-lua-documentation) - [INTERIOR | Lua Documentation](#interior-lua-documentation) - [DECORATOR | Lua Documentation](#decorator-lua-documentation) - [CAM | Lua Documentation](#cam-lua-documentation) - [STATS | Lua Documentation](#stats-lua-documentation) - [POOL | Lua Documentation](#pool-lua-documentation) - [AUDIO | Lua Documentation](#audio-lua-documentation) - [PLAYER | Lua Documentation](#player-lua-documentation) - [SYSTEM | Lua Documentation](#system-lua-documentation) - [CUTSCENE | Lua Documentation](#cutscene-lua-documentation) - [CLOCK | Lua Documentation](#clock-lua-documentation) - [WORLDPROBE | Lua Documentation](#worldprobe-lua-documentation) - [OBJECT | Lua Documentation](#object-lua-documentation) - [FIRE | Lua Documentation](#fire-lua-documentation) - [set_next_window_size | Lua Documentation](#set-next-window-size-lua-documentation) - [GAMEPLAY | Lua Documentation](#gameplay-lua-documentation) - [WATER | Lua Documentation](#water-lua-documentation) - [TASK | Lua Documentation](#task-lua-documentation) - [SCRIPT | Lua Documentation](#script-lua-documentation) - [NETWORK | Lua Documentation](#network-lua-documentation) - [g_imgui | Lua Documentation](#g-imgui-lua-documentation) - [get_window_size | Lua Documentation](#get-window-size-lua-documentation) - [pop_style_var | Lua Documentation](#pop-style-var-lua-documentation) - [NATIVES | Lua Documentation](#natives-lua-documentation) - [MOBILE | Lua Documentation](#mobile-lua-documentation) - [UI | Lua Documentation](#ui-lua-documentation) - [begin_window | Lua Documentation](#begin-window-lua-documentation) - [end_window | Lua Documentation](#end-window-lua-documentation) - [MISC | Lua Documentation](#misc-lua-documentation) - [STREAMING | Lua Documentation](#streaming-lua-documentation) - [WEAPON | Lua Documentation](#weapon-lua-documentation) - [begin_child | Lua Documentation](#begin-child-lua-documentation) - [set_next_window_pos | Lua Documentation](#set-next-window-pos-lua-documentation) - [get_display_size | Lua Documentation](#get-display-size-lua-documentation) - [push_style_var | Lua Documentation](#push-style-var-lua-documentation) - [add_rect | Lua Documentation](#add-rect-lua-documentation) - [same_line | Lua Documentation](#same-line-lua-documentation) - [PED | Lua Documentation](#ped-lua-documentation) - [new_line | Lua Documentation](#new-line-lua-documentation) - [GRAPHICS | Lua Documentation](#graphics-lua-documentation) - [VEHICLE | Lua Documentation](#vehicle-lua-documentation) - [columns | Lua Documentation](#columns-lua-documentation) - [separator | Lua Documentation](#separator-lua-documentation) - [get_window_pos | Lua Documentation](#get-window-pos-lua-documentation) - [set_next_item_width | Lua Documentation](#set-next-item-width-lua-documentation) - [is_item_hovered | Lua Documentation](#is-item-hovered-lua-documentation) - [CONTROL | Lua Documentation](#control-lua-documentation) - [add_circle | Lua Documentation](#add-circle-lua-documentation) - [next_column | Lua Documentation](#next-column-lua-documentation) - [add_line | Lua Documentation](#add-line-lua-documentation) - [add_button | Lua Documentation](#add-button-lua-documentation) - [end_child | Lua Documentation](#end-child-lua-documentation) - [ENTITY | Lua Documentation](#entity-lua-documentation) - [begin_tab_bar | Lua Documentation](#begin-tab-bar-lua-documentation) - [end_menu | Lua Documentation](#end-menu-lua-documentation) - [begin_popup | Lua Documentation](#begin-popup-lua-documentation) - [end_main_menu_bar | Lua Documentation](#end-main-menu-bar-lua-documentation) - [get_content_region_avail | Lua Documentation](#get-content-region-avail-lua-documentation) - [add_input_string_with_hint | Lua Documentation](#add-input-string-with-hint-lua-documentation) - [add_triangle | Lua Documentation](#add-triangle-lua-documentation) - [set_column_offset | Lua Documentation](#set-column-offset-lua-documentation) - [add_input_string | Lua Documentation](#add-input-string-lua-documentation) - [add_text | Lua Documentation](#add-text-lua-documentation) - [add_rect_filled | Lua Documentation](#add-rect-filled-lua-documentation) - [add_checkbox | Lua Documentation](#add-checkbox-lua-documentation) - [end_tab_item | Lua Documentation](#end-tab-item-lua-documentation) - [end_popup | Lua Documentation](#end-popup-lua-documentation) - [add_circle_filled | Lua Documentation](#add-circle-filled-lua-documentation) - [close_current_popup | Lua Documentation](#close-current-popup-lua-documentation) - [Globals | Lua Documentation](#globals-lua-documentation) - [begin_menu | Lua Documentation](#begin-menu-lua-documentation) - [menu_item | Lua Documentation](#menu-item-lua-documentation) - [is_popup_open | Lua Documentation](#is-popup-open-lua-documentation) - [add_triangle_filled | Lua Documentation](#add-triangle-filled-lua-documentation) - [begin_main_menu_bar | Lua Documentation](#begin-main-menu-bar-lua-documentation) - [end_tab_bar | Lua Documentation](#end-tab-bar-lua-documentation) - [begin_tab_item | Lua Documentation](#begin-tab-item-lua-documentation) - [open_popup | Lua Documentation](#open-popup-lua-documentation) --- # Practical Information | Lua Documentation [](https://docs.cherax.vip/#still-have-questions) Still have Questions? ---------------------------------------------------------------------------- You're welcome to contact us: * [Cherax Forum](https://cherax.vip/) [NextAPI Reference](https://docs.cherax.vip/lua-documentation/api-reference) Last updated 4 years ago --- # API Reference | Lua Documentation ![](https://docs.cherax.vip/~gitbook/image?url=https%3A%2F%2F381407022-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZQx9zuyJrxUfWrrhumKq%252Fuploads%252FOXM881xEpH5qW4QCv6pU%252Fcherax_letters_3.png%3Falt%3Dmedia%26token%3D0ab448ca-bab3-4aed-a91e-8517d2f8a770&width=768&dpr=4&quality=100&sign=f95ae4b5&sv=2) [](https://docs.cherax.vip/lua-documentation/api-reference#lua-engine-version) Lua Engine Version ------------------------------------------------------------------------------------------------------ * Lua 5.4 [](https://docs.cherax.vip/lua-documentation/api-reference#development-q-and-a) Development Q&A ---------------------------------------------------------------------------------------------------- Lua Directory: C:\\Users\\{machine.username}\\AppData\\Roaming\\Cherax\\Lua [PreviousPractical Information](https://docs.cherax.vip/) [NextClasses](https://docs.cherax.vip/lua-documentation/api-reference/classes) Last updated 4 years ago * [Lua Engine Version](https://docs.cherax.vip/lua-documentation/api-reference#lua-engine-version) * [Development Q&A](https://docs.cherax.vip/lua-documentation/api-reference#development-q-and-a) --- # vec2 | Lua Documentation @property float x @property float y @constructor vec2() @constructor vec2(float, float) @method vec2 \_\_add(vec2|vec3|float) @method vec2 \_\_sub(vec2|vec3|float) @method vec2 \_\_mul(vec2|vec3|float) @method vec2 \_\_div(vec2|vec3|float) @method bool \_\_eq(vec2) @method bool \_\_lt(vec2) @method bool \_\_le(vec2) @method string \_\_tostring() @method float length() @method float distanceTo(vec2) [PreviousClasses](https://docs.cherax.vip/lua-documentation/api-reference/classes) [Nextvec3](https://docs.cherax.vip/lua-documentation/api-reference/classes/vec3) Last updated 4 years ago --- # g_lua | Lua Documentation Copy g_lua.register(); // your code here g_lua.unregister(); [Previousvec3](https://docs.cherax.vip/lua-documentation/api-reference/classes/vec3) [Nextregister](https://docs.cherax.vip/lua-documentation/api-reference/g_lua/register) Last updated 4 years ago --- # Classes | Lua Documentation [vec2](https://docs.cherax.vip/lua-documentation/api-reference/classes/vec2) [vec3](https://docs.cherax.vip/lua-documentation/api-reference/classes/vec3) [PreviousAPI Reference](https://docs.cherax.vip/lua-documentation/api-reference) [Nextvec2](https://docs.cherax.vip/lua-documentation/api-reference/classes/vec2) Last updated 4 years ago --- # vec3 | Lua Documentation @property float x @property float y @property float z @constructor vec3() @constructor vec3(float, float, float) @method vec3 \_\_add(vec2|vec3|float) @method vec3 \_\_sub(vec2|vec3|float) @method vec3 \_\_mul(vec2|vec3|float) @method vec3 \_\_div(vec2|vec3|float) @method bool \_\_eq(vec3) @method bool \_\_lt(vec3) @method bool \_\_le(vec3) @method string \_\_tostring() @method float length() @method float distance(vec3) [Previousvec2](https://docs.cherax.vip/lua-documentation/api-reference/classes/vec2) [Nextg\_lua](https://docs.cherax.vip/lua-documentation/api-reference/g_lua) Last updated 4 years ago --- # unregister | Lua Documentation void unregister() [Previousregister](https://docs.cherax.vip/lua-documentation/api-reference/g_lua/register) [Nextload\_lua](https://docs.cherax.vip/lua-documentation/api-reference/g_lua/load_lua) Last updated 4 years ago --- # register | Lua Documentation void register() [Previousg\_lua](https://docs.cherax.vip/lua-documentation/api-reference/g_lua) [Nextunregister](https://docs.cherax.vip/lua-documentation/api-reference/g_lua/unregister) Last updated 4 years ago --- # load_lua | Lua Documentation void load\_lua(string filepath) [Previousunregister](https://docs.cherax.vip/lua-documentation/api-reference/g_lua/unregister) [Nextg\_memory](https://docs.cherax.vip/lua-documentation/api-reference/g_memory) Last updated 4 years ago --- # g_logger | Lua Documentation [log\_info](https://docs.cherax.vip/lua-documentation/api-reference/g_logger/log_info) [Previousread\_string](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_string) [Nextlog\_info](https://docs.cherax.vip/lua-documentation/api-reference/g_logger/log_info) Last updated 4 years ago --- # scan_pattern | Lua Documentation int g\_memory.scan\_pattern(string pattern, string module = nil) Copy result = g_memory.scan_pattern("40 38 35 ? ? ? ? 75 0E 4C 8B C3 49 8B D7 49 8B CE") -- scans for that pattern in GTA5.exe [Previousget\_base\_address](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/get_base_address) [Nextrip](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/rip) Last updated 4 years ago --- # g_memory | Lua Documentation [get\_base\_address](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/get_base_address) [scan\_pattern](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/scan_pattern) [rip](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/rip) [allocate](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/allocate) [free](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/free) [write\_byte](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_byte) [write\_short](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_short) [write\_int](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_int) [write\_long\_long](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_long_long) [write\_float](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_float) [write\_double](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_double) [write\_string](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_string) [read\_byte](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_byte) [read\_short](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_short) [read\_int](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_int) [read\_long\_long](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_long_long) [read\_float](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_float) [read\_double](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_double) [read\_string](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_string) [Previousload\_lua](https://docs.cherax.vip/lua-documentation/api-reference/g_lua/load_lua) [Nextget\_base\_address](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/get_base_address) Last updated 4 years ago --- # log_info | Lua Documentation void log\_info(string text) [Previousg\_logger](https://docs.cherax.vip/lua-documentation/api-reference/g_logger) [Nextg\_gui](https://docs.cherax.vip/lua-documentation/api-reference/g_gui) Last updated 4 years ago --- # free | Lua Documentation void free(int address) [Previousallocate](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/allocate) [Nextwrite\_byte](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_byte) Last updated 4 years ago --- # allocate | Lua Documentation int allocate(int bytes) Copy ptr = g_memory.allocate(4) g_memory.write_int(ptr, 1337) g_memory.free(ptr) [Previousrip](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/rip) [Nextfree](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/free) Last updated 4 years ago --- # get_base_address | Lua Documentation int get\_base\_address(string module = nil) Copy address = g_memory.get_base_address() -- base address of GTA5.exe address2 = g_memory.get_base_address("socialclub.dll") -- base address of socialclub.dll [Previousg\_memory](https://docs.cherax.vip/lua-documentation/api-reference/g_memory) [Nextscan\_pattern](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/scan_pattern) Last updated 4 years ago --- # write_short | Lua Documentation void write\_short(int address, short value) [Previouswrite\_byte](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_byte) [Nextwrite\_int](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_int) Last updated 4 years ago --- # write_float | Lua Documentation void write\_float(int address, float value) [Previouswrite\_long\_long](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_long_long) [Nextwrite\_double](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_double) Last updated 4 years ago --- # g_gui | Lua Documentation Copy g_lua.register(); myBoolean = false; myLongLong = 1337; g_gui.add_toggle("misc_lua", "Test Toggle", "test tooltip", function(on) myBoolean = on; end); g_gui.add_input_int("misc_lua", "INPUT", myLongLong, 50, 20000, 5, 100, function(val) myLongLong = val; end); g_gui.add_input_string("misc_lua", "text", "default", function(val) g_logger.log_info("in callback " .. val); end); while g_isRunning do g_logger.log_info("myLongLong is: " .. myLongLong); g_util.yield(1000) end g_lua.unregister(); [Previouslog\_info](https://docs.cherax.vip/lua-documentation/api-reference/g_logger/log_info) [Nextis\_open](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/is_open) Last updated 4 years ago --- # is_open | Lua Documentation bool is\_open() [Previousg\_gui](https://docs.cherax.vip/lua-documentation/api-reference/g_gui) [Nextopen](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/open) Last updated 4 years ago --- # cos | Lua Documentation int cos(int value) [Previoussin](https://docs.cherax.vip/lua-documentation/api-reference/g_math/sin) [Nexttan](https://docs.cherax.vip/lua-documentation/api-reference/g_math/tan) Last updated 4 years ago --- # close | Lua Documentation void close() [Previousopen](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/open) [Nexttoggle](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/toggle) Last updated 3 years ago --- # write_long_long | Lua Documentation void write\_long\_long(int address, long long value) [Previouswrite\_int](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_int) [Nextwrite\_float](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_float) Last updated 4 years ago --- # write_double | Lua Documentation void write\_double(int address, double value) [Previouswrite\_float](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_float) [Nextwrite\_string](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_string) Last updated 4 years ago --- # tan | Lua Documentation int tan(int value) [Previouscos](https://docs.cherax.vip/lua-documentation/api-reference/g_math/cos) [Nextg\_util](https://docs.cherax.vip/lua-documentation/api-reference/g_util) Last updated 4 years ago --- # add_toast | Lua Documentation void add\_toast(string text, float ms = default) [Previoustoggle](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/toggle) [Nextadd\_button](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/add_button) Last updated 4 years ago --- # add_input_string | Lua Documentation void add\_input\_string(string childWindow, string name, string initialText, function(string) callback) [Previousadd\_input\_float](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/add_input_float) [Nextg\_hooking](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking) Last updated 3 years ago --- # register_scripted_game_event_hook | Lua Documentation int register\_scripted\_game\_event\_hook(function(int sender, int count, array args) callback) Copy function mySGEhook(sender, count, args) g_logger.log_info("Script Event from "..PLAYER.GET_PLAYER_NAME(player)) g_logger.log_info("SE Hash: " .. tostring(args[1]) .. " Last Arg: " .. tostring(args[count])) if (args[1] == 1337) then return false -- false to block end return true end [Previousregister\_wndproc\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/register_wndproc_hook) [Nextunregister\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/unregister_hook) Last updated 4 years ago --- # sin | Lua Documentation int sin(int value) [Previousg\_math](https://docs.cherax.vip/lua-documentation/api-reference/g_math) [Nextcos](https://docs.cherax.vip/lua-documentation/api-reference/g_math/cos) Last updated 4 years ago --- # write_int | Lua Documentation void write\_int(int address, int value) [Previouswrite\_short](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_short) [Nextwrite\_long\_long](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_long_long) Last updated 4 years ago --- # read_int | Lua Documentation int read\_int(int address) [Previousread\_short](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_short) [Nextread\_long\_long](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_long_long) Last updated 4 years ago --- # unregister_hook | Lua Documentation bool unregister\_hook(int id) [Previousregister\_scripted\_game\_event\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/register_scripted_game_event_hook) [Nextg\_math](https://docs.cherax.vip/lua-documentation/api-reference/g_math) Last updated 4 years ago --- # register_wndproc_hook | Lua Documentation int register\_wndproc\_hook(function(int msg, int wparam, int lparam) callback) [Previousregister\_D3D\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/register_d3d_hook) [Nextregister\_scripted\_game\_event\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/register_scripted_game_event_hook) Last updated 4 years ago --- # read_short | Lua Documentation short read\_short(int address) [Previousread\_byte](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_byte) [Nextread\_int](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_int) Last updated 4 years ago --- # open | Lua Documentation void open() [Previousis\_open](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/is_open) [Nextclose](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/close) Last updated 3 years ago --- # add_input_float | Lua Documentation void add\_input\_float(string childWindow, string name, float startValue, float minValue, float maxValue, function callback) void add\_input\_float(string childWindow, string name, float startValue, float minValue, float maxValue, float step, function callback) [Previousadd\_input\_int](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/add_input_int) [Nextadd\_input\_string](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/add_input_string) Last updated 3 years ago --- # read_byte | Lua Documentation byte read\_byte(int address) [Previouswrite\_string](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_string) [Nextread\_short](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_short) Last updated 4 years ago --- # write_string | Lua Documentation void write\_string(int address, string value) [Previouswrite\_double](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_double) [Nextread\_byte](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_byte) Last updated 4 years ago --- # add_button | Lua Documentation void add\_button(string childWindow, string name, function() callback) void add\_button(string childWindow, string name, string tooltip, function() callback) [Previousadd\_toast](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/add_toast) [Nextadd\_toggle](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/add_toggle) Last updated 4 years ago --- # toggle | Lua Documentation void toggle [Previousclose](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/close) [Nextadd\_toast](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/add_toast) Last updated 3 years ago --- # read_string | Lua Documentation string read\_string(int address) [Previousread\_double](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_double) [Nextg\_logger](https://docs.cherax.vip/lua-documentation/api-reference/g_logger) Last updated 4 years ago --- # register_D3D_hook | Lua Documentation int register\_D3D\_hook(function() callback) [Previousg\_hooking](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking) [Nextregister\_wndproc\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/register_wndproc_hook) Last updated 4 years ago --- # add_input_int | Lua Documentation void add\_input\_int(string childWindow, string name, int default, int min, int max, int step, int stepfast, function(int) callback) [Previousadd\_toggle](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/add_toggle) [Nextadd\_input\_float](https://docs.cherax.vip/lua-documentation/api-reference/g_gui/add_input_float) Last updated 4 years ago --- # yield | Lua Documentation void yield(int ms = default) [Previousg\_util](https://docs.cherax.vip/lua-documentation/api-reference/g_util) [Nextis\_session\_started](https://docs.cherax.vip/lua-documentation/api-reference/g_util/is_session_started) Last updated 4 years ago --- # rip | Lua Documentation int g\_memory.rip(int address) Copy result = g_memory.scan_pattern("40 38 35 ? ? ? ? 75 0E 4C 8B C3 49 8B D7 49 8B CE") -- scans for that pattern in GTA5.exe is_session_started_ptr = g_memory.rip(result + 3) if g_memory.read_byte(is_session_started_ptr) then g_logger.log_info("Session is started") end [Previousscan\_pattern](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/scan_pattern) [Nextallocate](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/allocate) Last updated 4 years ago --- # read_double | Lua Documentation double read\_double(int address) [Previousread\_float](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_float) [Nextread\_string](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_string) Last updated 4 years ago --- # g_util | Lua Documentation [yield](https://docs.cherax.vip/lua-documentation/api-reference/g_util/yield) [is\_session\_started](https://docs.cherax.vip/lua-documentation/api-reference/g_util/is_session_started) [get\_selected\_player](https://docs.cherax.vip/lua-documentation/api-reference/g_util/get_selected_player) [trigger\_script\_event](https://docs.cherax.vip/lua-documentation/api-reference/g_util/trigger_script_event) [get\_menu\_version](https://docs.cherax.vip/lua-documentation/api-reference/g_util/get_menu_version) [joaat](https://docs.cherax.vip/lua-documentation/api-reference/g_util/joaat) [play\_wav\_file](https://docs.cherax.vip/lua-documentation/api-reference/g_util/play_wav_file) [Previoustan](https://docs.cherax.vip/lua-documentation/api-reference/g_math/tan) [Nextyield](https://docs.cherax.vip/lua-documentation/api-reference/g_util/yield) Last updated 4 years ago --- # g_math | Lua Documentation [sin](https://docs.cherax.vip/lua-documentation/api-reference/g_math/sin) [cos](https://docs.cherax.vip/lua-documentation/api-reference/g_math/cos) [tan](https://docs.cherax.vip/lua-documentation/api-reference/g_math/tan) [Previousunregister\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/unregister_hook) [Nextsin](https://docs.cherax.vip/lua-documentation/api-reference/g_math/sin) Last updated 4 years ago --- # joaat | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_util/joaat#hash-joaat-string-str) Hash joaat(string str) [Previousget\_menu\_version](https://docs.cherax.vip/lua-documentation/api-reference/g_util/get_menu_version) [Nextplay\_wav\_file](https://docs.cherax.vip/lua-documentation/api-reference/g_util/play_wav_file) Last updated 4 years ago --- # get_menu_version | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_util/get_menu_version#string-get_menu_version) string get\_menu\_version() [Previoustrigger\_script\_event](https://docs.cherax.vip/lua-documentation/api-reference/g_util/trigger_script_event) [Nextjoaat](https://docs.cherax.vip/lua-documentation/api-reference/g_util/joaat) Last updated 4 years ago --- # write_byte | Lua Documentation void write\_byte(int address, byte value) [Previousfree](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/free) [Nextwrite\_short](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/write_short) Last updated 4 years ago --- # is_session_started | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_util/is_session_started#bool-is_session_started) bool is\_session\_started() [Previousyield](https://docs.cherax.vip/lua-documentation/api-reference/g_util/yield) [Nextget\_selected\_player](https://docs.cherax.vip/lua-documentation/api-reference/g_util/get_selected_player) Last updated 4 years ago --- # trigger_script_event | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_util/trigger_script_event#void-trigger_script_event-int-player-array-data) void trigger\_script\_event(int player, array data) [Previousget\_selected\_player](https://docs.cherax.vip/lua-documentation/api-reference/g_util/get_selected_player) [Nextget\_menu\_version](https://docs.cherax.vip/lua-documentation/api-reference/g_util/get_menu_version) Last updated 4 years ago --- # read_long_long | Lua Documentation long long read\_long\_long(int address) [Previousread\_int](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_int) [Nextread\_float](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_float) Last updated 4 years ago --- # play_wav_file | Lua Documentation void play\_wav\_file(string file, bool looped, bool stop) [Previousjoaat](https://docs.cherax.vip/lua-documentation/api-reference/g_util/joaat) [Nextg\_imgui](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui) Last updated 4 years ago --- # read_float | Lua Documentation float read\_float(int address) [Previousread\_long\_long](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_long_long) [Nextread\_double](https://docs.cherax.vip/lua-documentation/api-reference/g_memory/read_double) Last updated 4 years ago --- # get_selected_player | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_util/get_selected_player#int-get_selected_player) int get\_selected\_player() [Previousis\_session\_started](https://docs.cherax.vip/lua-documentation/api-reference/g_util/is_session_started) [Nexttrigger\_script\_event](https://docs.cherax.vip/lua-documentation/api-reference/g_util/trigger_script_event) Last updated 4 years ago --- # time_ms | Lua Documentation int time\_ms() [Previoustime](https://docs.cherax.vip/lua-documentation/api-reference/g_os/time) [Nextfinger\_print](https://docs.cherax.vip/lua-documentation/api-reference/g_os/finger_print) Last updated 4 years ago --- # g_os | Lua Documentation [time](https://docs.cherax.vip/lua-documentation/api-reference/g_os/time) [time\_ms](https://docs.cherax.vip/lua-documentation/api-reference/g_os/time_ms) [finger\_print](https://docs.cherax.vip/lua-documentation/api-reference/g_os/finger_print) [Previousend\_popup](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_popup) [Nexttime](https://docs.cherax.vip/lua-documentation/api-reference/g_os/time) Last updated 4 years ago --- # finger_print | Lua Documentation string g\_os.finger\_print() [Previoustime\_ms](https://docs.cherax.vip/lua-documentation/api-reference/g_os/time_ms) [NextNATIVES](https://docs.cherax.vip/lua-documentation/api-reference/natives) Last updated 4 years ago --- # time | Lua Documentation int time() [Previousg\_os](https://docs.cherax.vip/lua-documentation/api-reference/g_os) [Nexttime\_ms](https://docs.cherax.vip/lua-documentation/api-reference/g_os/time_ms) Last updated 4 years ago --- # INTERIOR | Lua Documentation Copy Interior GET_INTERIOR_AT_COORDS_WITH_TYPE(float x, float y, float z, string interiorType) void ACTIVATE_INTERIOR_PROP(Interior interior, string entitySetName) void DEACTIVATE_INTERIOR_PROP(Interior interior, string entitySetName) bool IS_INTERIOR_PROP_ACTIVE(Interior interior, string entitySetName) Interior GET_INTERIOR_FROM_ENTITY(Entity entity) void REFRESH_INTERIOR(Interior interior) [PreviousAUDIO](https://docs.cherax.vip/lua-documentation/api-reference/natives/audio) [NextTASK](https://docs.cherax.vip/lua-documentation/api-reference/natives/task) Last updated 4 years ago --- # DECORATOR | Lua Documentation Copy bool DECOR_SET_TIME(Entity entity, string propertyName, int timestamp) bool DECOR_SET_BOOL(Entity entity, string propertyName, bool value) bool DECOR_SET_FLOAT(Entity entity, string propertyName, float value) bool DECOR_SET_INT(Entity entity, string propertyName, int value) bool DECOR_GET_BOOL(Entity entity, string propertyName) float DECOR_GET_FLOAT(Entity entity, string propertyName) int DECOR_GET_INT(Entity entity, string propertyName) bool DECOR_EXIST_ON(Entity entity, string propertyName) bool DECOR_REMOVE(Entity entity, string propertyName) void DECOR_REGISTER(string propertyName, int type) [PreviousCAM](https://docs.cherax.vip/lua-documentation/api-reference/natives/cam) [NextWORLDPROBE](https://docs.cherax.vip/lua-documentation/api-reference/natives/worldprobe) Last updated 4 years ago --- # CAM | Lua Documentation Copy vec3 GET_GAMEPLAY_CAM_COORD() vec3 GET_GAMEPLAY_CAM_ROT(int rotationOrder) float GET_GAMEPLAY_CAM_RELATIVE_HEADING() float GET_GAMEPLAY_CAM_RELATIVE_PITCH() Cam CREATE_CAM(string camName, bool p1) bool DOES_CAM_EXIST(Cam cam) void SET_CAM_ACTIVE(Cam cam, bool active) bool IS_CAM_ACTIVE(Cam cam) void SET_CAM_FOV(Cam cam, float fieldOfView) void SET_CAM_ROT(Cam cam, float rotX, float rotY, float rotZ, int rotationOrder) void SET_CAM_COORD(Cam cam, float posX, float posY, float posZ) void RENDER_SCRIPT_CAMS(bool render, bool ease, int easeTime, bool p3, bool p4, Any p5) void DESTROY_CAM(Cam cam, bool netMissionEntity) void SHAKE_CAM(Cam cam, string type, float amplitude) vec3 GET_FINAL_RENDERED_CAM_ROT(int rotationOrder) vec3 GET_FINAL_RENDERED_CAM_COORD() void SET_CAM_PARAMS(Cam cam, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fieldOfView, Any p8, int p9, int p10, int p11) void STOP_CAM_SHAKING(Cam cam, bool p1) void ATTACH_CAM_TO_ENTITY(Cam cam, Entity entity, float xOffset, float yOffset, float zOffset, bool isRelative) [PreviousSYSTEM](https://docs.cherax.vip/lua-documentation/api-reference/natives/system) [NextDECORATOR](https://docs.cherax.vip/lua-documentation/api-reference/natives/decorator) Last updated 4 years ago --- # STATS | Lua Documentation Copy bool STAT_SET_INT(Hash statName, int value, bool save) bool STAT_SET_FLOAT(Hash statName, float value, bool save) bool STAT_SET_BOOL(Hash statName, bool value, bool save) int STAT_GET_INT(Hash stat) float STAT_GET_FLOAT(Hash stat) bool STAT_GET_BOOL(Hash stat) Hash GET_NGSTAT_BOOL_HASH(int index, bool spStat, bool charStat, int character, string section) Hash GET_NGSTAT_INT_HASH(int index, bool spStat, bool charStat, int character, string section) int STAT_GET_PACKED_BOOL_MASK(int p0) int STAT_GET_PACKED_INT_MASK(int p0) bool STAT_SET_BOOL_MASKED(Hash statName, bool value, int mask, bool save) bool STAT_SET_INT_MASKED(Hash statName, Any p1, Any p2, int p3, bool save) bool STAT_SAVE(int p0, bool p1, int p2) [PreviousWORLDPROBE](https://docs.cherax.vip/lua-documentation/api-reference/natives/worldprobe) [NextCLOCK](https://docs.cherax.vip/lua-documentation/api-reference/natives/clock) Last updated 4 years ago --- # POOL | Lua Documentation Copy int GET_MAX_PEDS() int GET_MAX_VEHICLES() int GET_MAX_OBJECTS() int GET_PED_COUNT() int GET_VEHICLE_COUNT() int GET_OBJECT_COUNT() Ped GET_PED_AT_INDEX(int index) Vehicle GET_VEHICLE_AT_INDEX(int index) Object GET_OBJECT_AT_INDEX(int index) [PreviousNATIVES](https://docs.cherax.vip/lua-documentation/api-reference/natives) [NextPLAYER](https://docs.cherax.vip/lua-documentation/api-reference/natives/player) Last updated 4 years ago --- # AUDIO | Lua Documentation Copy void PLAY_SOUND(int soundId, string audioName, string audioRef, bool p3, Any p4, bool p5) void PLAY_SOUND_FRONTEND(int soundId, string audioName, string audioRef, bool p3) void PLAY_SOUND_FROM_ENTITY(int soundId, string audioName, Entity entity, string audioRef, bool isNetwork, Any p5) void PLAY_SOUND_FROM_COORD(int soundId, string audioName, float x, float y, float z, string audioRef, bool isNetwork, int range, bool p8) void STOP_SOUND(int soundId) void PLAY_PAIN(Ped ped, int painID, int p1, Any p3) void SET_PED_IS_DRUNK(Ped ped, bool toggle) string GET_PLAYER_RADIO_STATION_NAME() string GET_RADIO_STATION_NAME(int radioStation) void FREEZE_RADIO_STATION(string radioStation) void UNFREEZE_RADIO_STATION(string radioStation) void SKIP_RADIO_FORWARD() void SET_RADIO_TRACK(string radioStation, string radioTrack) void SET_RADIO_STATION_IS_VISIBLE(string radioStation, bool toggle) [PreviousWATER](https://docs.cherax.vip/lua-documentation/api-reference/natives/water) [NextINTERIOR](https://docs.cherax.vip/lua-documentation/api-reference/natives/interior) Last updated 4 years ago --- # PLAYER | Lua Documentation Copy Ped GET_PLAYER_PED(Player player) Ped GET_PLAYER_PED_SCRIPT_INDEX(Player player) Ped PLAYER_PED_ID() Player PLAYER_ID() void SET_PLAYER_WANTED_LEVEL(Player player, int wantedLevel, bool disableNoMission) void SET_PLAYER_WANTED_LEVEL_NOW(Player player, bool p1) void SET_PLAYER_MODEL(Player player, Hash model) int GET_PLAYER_GROUP(Player player) bool IS_PLAYER_PLAYING(Player player) bool IS_PLAYER_FREE_AIMING(Player player) string GET_PLAYER_NAME(Player player) bool IS_PLAYER_PRESSING_HORN(Player player) int GET_PLAYER_WANTED_LEVEL(Player player) bool GET_PLAYER_INVINCIBLE(Player player) void SET_PLAYER_VISIBLE_LOCALLY(Player player, bool toggle) void SET_LOCAL_PLAYER_VISIBLE_LOCALLY(bool p0) int PLAYER_COUNT() bool IS_PLAYER_FEMALE(Player player) bool IS_PLAYER_FRIEND(Player player) Entity GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(Player player) int GET_PLAYER_SCID(Player player) int GET_PLAYER_IP(Player player) bool IS_PLAYER_IN_ANY_VEHICLE(Player player) vec3 GET_PLAYER_COORDS(Player player) float GET_PLAYER_HEADING(Player player) float GET_PLAYER_HEALTH(Player player) float GET_PLAYER_MAX_HEALTH(Player player) float GET_PLAYER_ARMOR(Player player) int GET_PLAYER_FROM_PED(Ped ped) int GET_PLAYER_TEAM(Player player) Vehicle GET_PLAYER_VEHICLE(Player player) bool IS_PLAYER_HOST(Player player) Player GET_HOST() bool IS_PLAYER_SCRIPT_HOST(Player player) Player GET_SCRIPT_HOST() Hash GET_PLAYER_MODEL(Player player) bool IS_PLAYER_VALID(Player player) int GET_PLAYER_HOST_TOKEN(Player player) int GET_PLAYER_HOST_PRIORITY(Player player) void SET_PLAYER_TARGETING_MODE(int mode) void SPECIAL_ABILITY_FILL_METER(Player player, bool p1) string IS_PLAYER_MODDER(Player player) bool DID_PLAYER_TRIGGER_RAC(Player player, int flag) [PreviousPOOL](https://docs.cherax.vip/lua-documentation/api-reference/natives/pool) [NextSYSTEM](https://docs.cherax.vip/lua-documentation/api-reference/natives/system) Last updated 4 years ago --- # SYSTEM | Lua Documentation Copy void WAIT(int ms) void WAIT() void YIELD(int ms) void YIELD() [PreviousPLAYER](https://docs.cherax.vip/lua-documentation/api-reference/natives/player) [NextCAM](https://docs.cherax.vip/lua-documentation/api-reference/natives/cam) Last updated 4 years ago --- # CUTSCENE | Lua Documentation Copy bool IS_CUTSCENE_ACTIVE() bool IS_CUTSCENE_PLAYING() bool HAS_CUTSCENE_LOADED() void STOP_CUTSCENE_IMMEDIATELY() [PreviousSTREAMING](https://docs.cherax.vip/lua-documentation/api-reference/natives/streaming) [NextWATER](https://docs.cherax.vip/lua-documentation/api-reference/natives/water) Last updated 4 years ago --- # CLOCK | Lua Documentation Copy void SET_CLOCK_TIME(int hour, int minute, int second) void PAUSE_CLOCK(bool toggle) int GET_CLOCK_HOURS() int GET_CLOCK_MINUTES() int GET_CLOCK_SECONDS() [PreviousSTATS](https://docs.cherax.vip/lua-documentation/api-reference/natives/stats) [NextFIRE](https://docs.cherax.vip/lua-documentation/api-reference/natives/fire) Last updated 4 years ago --- # WORLDPROBE | Lua Documentation Copy int START_SHAPE_TEST(float fromX, float fromY, float fromZ, float toX, float toY, float toZ, Entity ignore) Entity GET_HIT_ENTITY(int handle) vec3 GET_HIT_COORDS(int handle) bool DID_HIT_ANYTHING(int handle) [PreviousDECORATOR](https://docs.cherax.vip/lua-documentation/api-reference/natives/decorator) [NextSTATS](https://docs.cherax.vip/lua-documentation/api-reference/natives/stats) Last updated 4 years ago --- # OBJECT | Lua Documentation Copy Hash GET_PICKUP_HASH_FROM_WEAPON(Hash weaponHash) Hash GET_WEAPON_TYPE_FROM_PICKUP_TYPE(Hash pickupHash) Object GET_CLOSEST_OBJECT_OF_TYPE(float x, float y, float z, float radius, Hash modelHash, bool isMission, bool p6, bool p7) Object CREATE_OBJECT(Hash modelHash, float x, float y, float z, bool isNetwork, bool bScriptHostObj, bool dynamic) OBJECT.CREATE_WORLD_OBJECT(Hash modelHash, float x, float y, float z, bool isNetwork, bool dynamic) Pickup CREATE_AMBIENT_PICKUP(Hash pickupHash, float posX, float posY, float posZ, int flags, int value, Hash modelHash, bool p7, bool p8) [PreviousNETWORK](https://docs.cherax.vip/lua-documentation/api-reference/natives/network) [NextENTITY](https://docs.cherax.vip/lua-documentation/api-reference/natives/entity) Last updated 4 years ago --- # FIRE | Lua Documentation Copy FireId START_ENTITY_FIRE(Entity entity) void STOP_ENTITY_FIRE(Entity entity) bool IS_ENTITY_ON_FIRE(Entity entity) void ADD_EXPLOSION(float x, float y, float z, int explosionType, float damageScale, bool isAudible, bool isInvisible, float cameraShake, bool noDamage) void ADD_OWNED_EXPLOSION(Ped owner, float x, float y, float z, int explosionType, float damageScale, bool isAudible, bool isInvisible, float cameraShake) [PreviousCLOCK](https://docs.cherax.vip/lua-documentation/api-reference/natives/clock) [NextSTREAMING](https://docs.cherax.vip/lua-documentation/api-reference/natives/streaming) Last updated 4 years ago --- # set_next_window_size | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_next_window_size#void-set_next_window_size-vec2-size) void set\_next\_window\_size(vec2 size) [Previousget\_display\_size](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_display_size) [Nextset\_next\_window\_pos](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_next_window_pos) Last updated 4 years ago --- # GAMEPLAY | Lua Documentation Copy void TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME(string scriptName) void SET_FAKE_WANTED_LEVEL(int fakeWantedLevel) bool IS_BIT_SET(int address, int offset) void CANCEL_STUNT_JUMP() bool IS_STUNT_JUMP_IN_PROGRESS() void SET_STUNT_JUMPS_CAN_TRIGGER(bool toggle) void SET_GRAVITY_LEVEL(int level) void SET_PLAYER_IS_IN_ANIMAL_FORM(bool toggle) bool GET_IS_PLAYER_IN_ANIMAL_FORM() void SET_BIT(int address, int offset) void CLEAR_BIT(int address, int offset) bool IS_DLC_PRESENT(Hash dlcHash) void SET_BLACKOUT(bool toggle) int GET_GAME_STATE() bool IS_GAME_STATE(int state) float GET_GROUND_Z(float x, float y) bool IS_ONSCREEN_KEYBOARD_ACTIVE() Hash GET_HASH_KEY(string string) void DISPLAY_ONSCREEN_KEYBOARD(string windowTitle, string defaultText, int maxInputLength) int UPDATE_ONSCREEN_KEYBOARD() string GET_ONSCREEN_KEYBOARD_RESULT() void SET_OVERRIDE_WEATHER(string weatherType) void CLEAR_OVERRIDE_WEATHER() void SET_MOBILE_RADIO(bool toggle) void CLEAR_AREA_OF_VEHICLES(float x, float y, float z, float radius, bool p4, bool p5, bool p6, bool p7, bool p8, bool p9) void CLEAR_AREA_OF_OBJECTS(float x, float y, float z, float radius, int flags) void CLEAR_AREA_OF_PEDS(float x, float y, float z, float radius, int flags) void CLEAR_AREA_OF_COPS(float x, float y, float z, float radius, int flags) void CLEAR_AREA_OF_PROJECTILES(float x, float y, float z, float radius, int flags) void _SET_CLOUD_HAT_OPACITY(float opacity) float _GET_CLOUD_HAT_OPACITY() void PRELOAD_CLOUD_HAT(string name) void _CLEAR_CLOUD_HAT() void LOAD_CLOUD_HAT(string name, float transitionTime) void UNLOAD_CLOUD_HAT(string name, float p1) float GET_FRAME_TIME() int GET_FRAME_COUNT() void SHOOT_SINGLE_BULLET_BETWEEN_COORDS(float x1, float y1, float z1, float x2, float y2, float z2, int damage, bool p7, Hash weaponHash, Ped ownerPed, bool isAudible, bool isInvisible, float speed) [PreviousMISC](https://docs.cherax.vip/lua-documentation/api-reference/natives/misc) [NextUI](https://docs.cherax.vip/lua-documentation/api-reference/natives/ui) Last updated 4 years ago --- # WATER | Lua Documentation Copy void MODIFY_WATER(float x, float y, float radius, float height) void SET_WAVES_INTENSITY(float intensity) float GET_WAVES_INTENSITY() void RESET_WAVES_INTENSITY() [PreviousCUTSCENE](https://docs.cherax.vip/lua-documentation/api-reference/natives/cutscene) [NextAUDIO](https://docs.cherax.vip/lua-documentation/api-reference/natives/audio) Last updated 4 years ago --- # TASK | Lua Documentation Copy void TASK_COMBAT_PED(Ped ped, Ped targetPed, int p2, int p3) void TASK_WANDER_STANDARD(Ped ped, float p1, int p2) void TASK_VEHICLE_DRIVE_WANDER(Ped ped, Vehicle vehicle, float speed, int drivingStyle) void TASK_START_SCENARIO_IN_PLACE(Ped ped, string scenarioName, int unkDelay, bool playEnterAnim) void TASK_START_SCENARIO_AT_POSITION(Ped ped, string scenarioName, float x, float y, float z, float heading, int duration, bool sittingScenario, bool teleport) void TASK_STAND_GUARD(Ped ped, float x, float y, float z, float heading, string scenarioName) void PLAY_ANIM_ON_RUNNING_SCENARIO(Ped ped, string animDict, string animName) bool DOES_SCENARIO_GROUP_EXIST(string scenarioGroup) bool IS_SCENARIO_GROUP_ENABLED(string scenarioGroup) void SET_SCENARIO_GROUP_ENABLED(string scenarioGroup, bool p1) void RESET_SCENARIO_GROUPS_ENABLED() void SET_EXCLUSIVE_SCENARIO_GROUP(string scenarioGroup) void RESET_EXCLUSIVE_SCENARIO_GROUP() bool IS_SCENARIO_TYPE_ENABLED(string scenarioType) void SET_SCENARIO_TYPE_ENABLED(string scenarioType, bool toggle) void RESET_SCENARIO_TYPES_ENABLED() bool IS_PED_ACTIVE_IN_SCENARIO(Ped ped) void TASK_FOLLOW_TO_OFFSET_OF_ENTITY(Ped ped, Entity entity, float offsetX, float offsetY, float offsetZ, float movementSpeed, int timeout, float stoppingRange, bool persistFollowing) void TASK_GO_STRAIGHT_TO_COORD(Ped ped, float x, float y, float z, float speed, int timeout, float targetHeading, float distanceToSlide) void TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE(Ped ped, Vehicle vehicle, float x, float y, float z, float speed, int driveMode, float stopRange) void TASK_SHOOT_AT_ENTITY(Entity entity, Entity target, int duration, Hash firingPattern) void TASK_VEHICLE_ESCORT(Ped ped, Vehicle vehicle, Vehicle targetVehicle, int mode, float speed, int drivingStyle, float minDistance, int p7, float noRoadsDistance) void TASK_VEHICLE_FOLLOW(Ped driver, Vehicle vehicle, Entity targetEntity, float speed, int drivingStyle, int minDistance) void TASK_VEHICLE_DRIVE_TO_COORD(Ped ped, Vehicle vehicle, float x, float y, float z, float speed, Any p6, Hash vehicleModel, int drivingMode, float stopRange, float p10) void TASK_VEHICLE_SHOOT_AT_PED(Ped ped, Ped target, float p2) void TASK_VEHICLE_AIM_AT_PED(Ped ped, Ped target) void TASK_VEHICLE_SHOOT_AT_COORD(Ped ped, float x, float y, float z, float p4) void TASK_VEHICLE_AIM_AT_COORD(Ped ped, float x, float y, float z) void TASK_STAY_IN_COVER(Ped ped) void TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD(Ped ped, float x, float y, float z, float aimAtX, float aimAtY, float aimAtZ, float moveSpeed, bool p8, float p9, float p10, bool p11, Any flags, bool p13, Hash firingPattern) void TASK_GO_TO_COORD_WHILE_AIMING_AT_ENTITY(Any p0, float p1, float p2, float p3, Any p4, float p5, bool p6, float p7, float p8, bool p9, Any p10, bool p11, Any p12, Any p13) void TASK_GO_TO_ENTITY_WHILE_AIMING_AT_COORD(Any p0, Any p1, float p2, float p3, float p4, float p5, bool p6, float p7, float p8, bool p9, bool p10, Any p11) void TASK_GO_TO_ENTITY_WHILE_AIMING_AT_ENTITY(Ped ped, Entity entityToWalkTo, Entity entityToAimAt, float speed, bool shootatEntity, float p5, float p6, bool p7, bool p8, Hash firingPattern) void TASK_OPEN_VEHICLE_DOOR(Ped ped, Vehicle vehicle, int timeOut, int seat, float speed) void TASK_ENTER_VEHICLE(Ped ped, Vehicle vehicle, int timeout, int seat, float speed, int flag, Any p6) void TASK_LEAVE_VEHICLE(Ped ped, Vehicle vehicle, int flags) void TASK_SKY_DIVE(Ped ped, bool p1) void TASK_PARACHUTE(Ped ped, bool p1, bool p2) void TASK_PARACHUTE_TO_TARGET(Ped ped, float x, float y, float z) void SET_PARACHUTE_TASK_TARGET(Ped ped, float x, float y, float z) void SET_PARACHUTE_TASK_THRUST(Ped ped, float thrust) void TASK_RAPPEL_FROM_HELI(Ped ped, float p1) void TASK_VEHICLE_CHASE(Ped driver, Entity targetEnt) void SET_TASK_VEHICLE_CHASE_BEHAVIOR_FLAG(Ped ped, int flag, bool set) void SET_TASK_VEHICLE_CHASE_IDEAL_PURSUIT_DISTANCE(Ped ped, float distance) void TASK_SHOOT_AT_COORD(Ped ped, float x, float y, float z, int duration, Hash firingPattern) void TASK_AIM_GUN_AT_COORD(Ped ped, float x, float y, float z, int time, bool p5, bool p6) void TASK_AIM_GUN_AT_ENTITY(Ped ped, Entity entity, int duration, bool p3) void TASK_TURN_PED_TO_FACE_ENTITY(Ped ped, Entity entity, int duration) bool IS_TASK_ACTIVE(Ped ped, int taskIndex) void TASK_PLAY_ANIM(Ped ped, string animDictionary, string animationName, float blendInSpeed, float blendOutSpeed, int duration, int flag, float playbackRate, bool lockX, bool lockY, bool lockZ) void STOP_ANIM_TASK(Ped ped, string animDictionary, string animationName, float p3) void TASK_PLANE_MISSION(Ped pilot, Vehicle aircraft, Vehicle targetVehicle, Ped targetPed, float destinationX, float destinationY, float destinationZ, int missionFlag, float angularDrag, float unk, float targetHeading, float maxZ, float minZ, Any p13) void TASK_VEHICLE_MISSION_PED_TARGET(Ped ped, Vehicle vehicle, Ped pedTarget, int missionType, float maxSpeed, int drivingStyle, float minDistance, float p7, bool DriveAgainstTraffic) [PreviousINTERIOR](https://docs.cherax.vip/lua-documentation/api-reference/natives/interior) [NextCONTROL](https://docs.cherax.vip/lua-documentation/api-reference/natives/control) Last updated 4 years ago --- # SCRIPT | Lua Documentation Copy int START_NEW_SCRIPT(string scriptName, int stackSize) Player GET_HOST_OF_THIS_SCRIPT() float GET_GLOBAL_F(int global) int GET_GLOBAL_I(int global) void SET_GLOBAL_F(int global, float value) void SET_GLOBAL_I(int global, int value) float GET_LOCAL_F(Hash script, int local) int GET_LOCAL_I(Hash script, int local) void SET_LOCAL_F(Hash script, int local, float value) void SET_LOCAL_I(Hash script, int local, int value) [PreviousWEAPON](https://docs.cherax.vip/lua-documentation/api-reference/natives/weapon) [NextPED](https://docs.cherax.vip/lua-documentation/api-reference/natives/ped) Last updated 4 years ago --- # NETWORK | Lua Documentation Copy void SET_ENTITY_EXISTS_ON_ALL_MACHINES(Entity entity, bool toggle) int GET_NET_OBJECT_ID(Entity entity) bool NETSHOP_TRANSFER_BANK_TO_WALLET(int charSlot, int amount) bool NETSHOP_TRANSFER_WALLET_TO_BANK(int charSlot, int amount) bool NETSHOP_TRANSFER_CASH_SET_TELEMETRY_NONCE_SEED() bool NETSHOP_CHECKOUT_START(int transactionId) int NETSHOP_BEGIN_SERVICE(Hash categoryHash, Hash itemHash, Hash actionTypeHash, int value, int flags) string SC_GET_NICKNAME() void NETWORK_SUPPRESS_INVITE(bool toggle) void NETWORK_BLOCK_INVITES(bool toggle) bool NETWORK_GET_THIS_SCRIPT_IS_NETWORK_SCRIPT() string NETWORK_PLAYER_GET_NAME(Player player) bool NETWORK_PLAYER_IS_ROCKSTAR_DEV(Player player) bool NETWORK_PLAYER_INDEX_IS_CHEATER(Player player) void NETWORK_FADE_IN_ENTITY(Entity entity, bool state, Any p2) void NETWORK_FADE_OUT_ENTITY(Entity entity, bool normal, bool slow) string GET_ONLINE_VERSION() bool NETWORK_IS_HOST() void NETWORK_SESSION_KICK_PLAYER(Player player) bool TRIGGER_SCRIPT_CRC_CHECK_ON_PLAYER(Player player, int p1, Hash scriptHash) void SET_THIS_SCRIPT_IS_NETWORK_SCRIPT(int maxNumMissionParticipants, bool p1, int instanceId) bool REQUEST_CONTROL_OF_ENTITY(Entity entity) bool HAS_CONTROL_OF_ENTITY(Entity entity) bool IS_SESSION_STARTED() Hash NETWORK_HASH_FROM_PLAYER(Player player) int NETWORK_GET_MAX_FRIENDS() int NETWORK_GET_FRIEND_COUNT() bool NETWORK_IS_FRIEND_ONLINE(string name) bool NETWORK_IS_FRIEND_IN_MULTIPLAYER(string friendName) string NETWORK_GET_FRIEND_NAME(int friendIndex) bool NETWORK_IS_FRIEND_INDEX_ONLINE(int friendIndex) void NETWORK_SET_PLAYER_IS_PASSIVE(bool toggle) int GET_FRIEND_SCID(string name) bool IS_SCID_FRIEND(int scid) void SEND_CHAT_MESSAGE(string message, bool team) void SEND_CHAT_MESSAGE_AS(Player player, string message, bool team) bool IS_MULTIPLAYER_CHAT_ACTIVE() void CLOSE_MULTIPLAYER_CHAT() void NETWORK_SET_IN_SPECTATOR_MODE(bool toggle, Ped playerPed) bool NETWORK_IS_PLAYER_CONNECTED(Player player) void MIGRATE_SCRIPT_HOST() void MIGRATE_SCRIPT_HOST(string script) int NETWORK_GET_NETWORK_ID_FROM_ENTITY(Entity entity) void SET_NETWORK_ID_CAN_MIGRATE(int netId, bool toggle) [PreviousCONTROL](https://docs.cherax.vip/lua-documentation/api-reference/natives/control) [NextOBJECT](https://docs.cherax.vip/lua-documentation/api-reference/natives/object) Last updated 4 years ago --- # g_imgui | Lua Documentation Copy function myButtonCallback() g_logger.log_info("Callback called") end function myToggleCallback(value) myBool = value end function myD3DHook() if g_gui.is_open() then g_imgui.set_next_window_size(vec2(400, 600)) if g_imgui.begin_window("Test Window", ImGuiWindowFlags_NoResize) then g_imgui.begin_child("Test Child", vec2(), true) g_imgui.add_button("Test Button", vec2(), myButtonCallback) g_imgui.add_checkbox("Test Checkbox", myToggleCallback) if g_imgui.add_button("Test Button 2", vec2(), function() g_logger.log_info("Callback in scripting thread") end) then g_logger.log_info("Pressed") end g_imgui.end_child() g_imgui.end_window() end end if myBool then g_imgui.add_circle_filled(g_imgui.get_display_size() / 2, 50.0, 105, 205, 255) g_imgui.add_line(vec2(), g_imgui.get_display_size(), 45, 155, 255) end end g_lua.register(); id = g_hooking.register_D3D_hook(myD3DHook); while g_isRunning do g_util.yield(100) end g_hooking.unregister_hook(id); g_lua.unregister(); [Previousplay\_wav\_file](https://docs.cherax.vip/lua-documentation/api-reference/g_util/play_wav_file) [NextGlobals](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/globals) Last updated 4 years ago --- # get_window_size | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_window_size#vec2-get_window_size) vec2 get\_window\_size() [Previousset\_next\_window\_pos](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_next_window_pos) [Nextget\_window\_pos](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_window_pos) Last updated 4 years ago --- # pop_style_var | Lua Documentation void pop\_style\_var(int count = 1) Copy g_imgui.push_style_var(ImGuiStyleVar_WindowBorderSize, 0.0); g_imgui.push_style_var(ImGuiStyleVar_WindowPadding, vec(0, 0)); // draw your stuff here g_imgui.pop_style_var(2) // resets the style changes [Previouspush\_style\_var](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/push_style_var) [Nextbegin\_window](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_window) Last updated 4 years ago --- # NATIVES | Lua Documentation Here you find GTA Natives which you can use in your scripts. Example: Copy ENTITY.SET_ENTITY_INVINCIBLE(PLAYER.PLAYER_PED_ID(), toggle) [Previousfinger\_print](https://docs.cherax.vip/lua-documentation/api-reference/g_os/finger_print) [NextPOOL](https://docs.cherax.vip/lua-documentation/api-reference/natives/pool) Last updated 4 years ago --- # MOBILE | Lua Documentation Copy void CREATE_MOBILE_PHONE(int phoneType) void DESTROY_MOBILE_PHONE() void SET_MOBILE_PHONE_SCALE(float scale) void SET_MOBILE_PHONE_POSITION(float posX, float posY, float posZ) vec3 GET_MOBILE_PHONE_POSITION() [PreviousGRAPHICS](https://docs.cherax.vip/lua-documentation/api-reference/natives/graphics) Last updated 4 years ago --- # UI | Lua Documentation Copy int GET_WAYPOINT_BLIP_ENUM_ID() Blip GET_FIRST_BLIP_INFO_ID(int blipSprite) bool DOES_BLIP_EXIST(Blip blip) Blip GET_NEXT_BLIP_INFO_ID(int blipSprite) int GET_BLIP_INFO_ID_TYPE(Blip blip) vec3 GET_BLIP_INFO_ID_COORD(Blip blip) void BEGIN_TEXT_COMMAND_DISPLAY_TEXT(string text) void ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(string text) void END_TEXT_COMMAND_DISPLAY_TEXT(float x, float y, int p2) void DRAW_TEXT(string text, float x, float y, float width, float height, int red, int green, int blue, int alpha, int font, bool centered, bool rightAligned, bool outline) Blip GET_BLIP_FROM_ENTITY(Entity entity) Blip ADD_BLIP_FOR_ENTITY(Entity entity) void SET_BLIP_SPRITE(Blip blip, int spriteId) void SET_BLIP_COLOUR(Blip blip, int color) void HIDE_HUD_COMPONENT_THIS_FRAME(int id) void HIDE_HUD_AND_RADAR_THIS_FRAME() string GET_LABEL_TEXT(string labelName) void DRAW_RECT(float x, float y, float width, float height, int r, int g, int b, int a, bool p8) void DRAW_LINE(float x1, float y1, float z1, float x2, float y2, float z2, int red, int green, int blue, int alpha) void SET_TEXT_SCALE(float scale, float size) void SET_TEXT_COLOUR(int red, int green, int blue, int alpha) void SET_TEXT_FONT(int fontType) void SET_TEXT_WRAP(float start, float end) void SET_TEXT_OUTLINE() void SET_TEXT_CENTRE(bool align) void SET_TEXT_RIGHT_JUSTIFY(bool toggle) void SET_TEXT_JUSTIFICATION(int justifyType) void SET_NEW_WAYPOINT(float x, float y) bool IS_HUD_COMPONENT_ACTIVE(int id) void SHOW_HUD_COMPONENT_THIS_FRAME(int id) void SET_WAYPOINT_OFF() void SET_BLIP_AS_MISSION_CREATOR_BLIP(Blip blip, bool toggle) bool IS_MISSION_CREATOR_BLIP(Blip blip) Blip ADD_BLIP_FOR_RADIUS(float posX, float posY, float posZ, float radius) Blip ADD_BLIP_FOR_PICKUP(Pickup pickup) Blip ADD_BLIP_FOR_COORD(float x, float y, float z) void SET_BLIP_COORD(Blip blip, float posX, float posY, float posZ) vec3 GET_BLIP_COORDS(Blip blip) void REMOVE_BLIP(Blip blip) void SET_BLIP_ROUTE(Blip blip, bool enabled) void SET_BLIP_ROUTE_COLOUR(Blip blip, int colour) int GET_WAYPOINT_BLIP_ENUM_ID() Blip GET_FIRST_BLIP_INFO_ID(int blipSprite) BOOL DOES_BLIP_EXIST(Blip blip) Blip GET_NEXT_BLIP_INFO_ID(int blipSprite) int GET_BLIP_INFO_ID_TYPE(Blip blip) vec3 GET_BLIP_INFO_ID_COORD(Blip blip) [PreviousGAMEPLAY](https://docs.cherax.vip/lua-documentation/api-reference/natives/gameplay) [NextGRAPHICS](https://docs.cherax.vip/lua-documentation/api-reference/natives/graphics) Last updated 4 years ago --- # begin_window | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_window#bool-begin_window-string-name-int-imguiwindowflags_-0) bool begin\_window(string name, int ImGuiWindowFlags\_ = 0) [Previouspop\_style\_var](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/pop_style_var) [Nextend\_window](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_window) Last updated 4 years ago --- # end_window | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_window#void-end_window) void end\_window() [Previousbegin\_window](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_window) [Nextbegin\_child](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_child) Last updated 4 years ago --- # MISC | Lua Documentation Copy bool FILE_EXISTS(string path) bool DIR_EXISTS(string path) void MAKE_DIR(string path) string GET_APPDATA_PATH(string dir, string file) string FROM_CLIPBOARD() void TO_CLIPBOARD(string str) int TIME() int TIME_MS() [PreviousPED](https://docs.cherax.vip/lua-documentation/api-reference/natives/ped) [NextGAMEPLAY](https://docs.cherax.vip/lua-documentation/api-reference/natives/gameplay) Last updated 4 years ago --- # STREAMING | Lua Documentation Copy int GET_MODEL_INFO(Hash model) void REQUEST_MODEL(Hash model) bool HAS_MODEL_LOADED(Hash model) void SET_MODEL_AS_NO_LONGER_NEEDED(Hash model) bool IS_MODEL_IN_CDIMAGE(Hash model) bool IS_MODEL_VALID(Hash model) bool IS_MODEL_A_PED(Hash model) bool IS_MODEL_A_VEHICLE(Hash model) bool DOES_ANIM_DICT_EXIST(string animDict) void REQUEST_ANIM_DICT(string animDict) bool HAS_ANIM_DICT_LOADED(string animDict) void REMOVE_ANIM_DICT(string animDict) void REQUEST_ANIM_SET(string animSet) bool HAS_ANIM_SET_LOADED(string animSet) void REMOVE_ANIM_SET(string animSet) void REQUEST_IPL(string iplName) void REMOVE_IPL(string iplName) bool IS_IPL_ACTIVE(string iplName) bool IS_MODEL_A_BOAT(Hash model) bool IS_MODEL_A_JETSKI(Hash model) bool IS_MODEL_A_PLANE(Hash model) bool IS_MODEL_A_HELI(Hash model) bool IS_MODEL_A_CAR(Hash model) bool IS_MODEL_A_TRAIN(Hash model) bool IS_MODEL_A_BIKE(Hash model) bool IS_MODEL_A_BICYCLE(Hash model) bool IS_MODEL_A_QUAD(Hash model) [PreviousFIRE](https://docs.cherax.vip/lua-documentation/api-reference/natives/fire) [NextCUTSCENE](https://docs.cherax.vip/lua-documentation/api-reference/natives/cutscene) Last updated 4 years ago --- # WEAPON | Lua Documentation Copy void GIVE_DELAYED_WEAPON_TO_PED(Ped ped, Hash weaponHash, int ammoCount, bool bForceInHand) int GET_WEAPON_TINT_COUNT(Hash weaponHash) int GET_PED_WEAPON_TINT_INDEX(Ped ped, Hash weaponHash) void SET_PED_WEAPON_TINT_INDEX(Ped ped, Hash weaponHash, int tintIndex) void GIVE_WEAPON_COMPONENT_TO_PED(Ped ped, Hash weaponHash, Hash componentHash) void REMOVE_WEAPON_COMPONENT_FROM_PED(Ped ped, Hash weaponHash, Hash componentHash) void REMOVE_ALL_PED_WEAPONS(Ped ped, bool p1) void REMOVE_WEAPON_FROM_PED(Ped ped, Hash weaponHash) void SET_PED_AMMO(Ped ped, Hash weaponHash, int ammo) bool HAS_PED_GOT_WEAPON_COMPONENT(Ped ped, Hash weaponHash, Hash componentHash) Hash GET_PED_AMMO_TYPE_FROM_WEAPON(Ped ped, Hash weaponHash) void SET_PED_AMMO_BY_TYPE(Ped ped, Hash ammoTypeHash, int ammo) bool HAS_PED_GOT_WEAPON(Ped ped, Hash weaponHash) int GET_MAX_AMMO(Ped ped, Hash weaponHash) int GET_AMMO_IN_PED_WEAPON(Ped ped, Hash weaponhash) bool IS_PED_WEAPON_READY_TO_SHOOT(Ped ped) bool IS_PED_ARMED(Ped ped, int typeFlags) bool IS_WEAPON_VALID(Hash weaponHash) [PreviousVEHICLE](https://docs.cherax.vip/lua-documentation/api-reference/natives/vehicle) [NextSCRIPT](https://docs.cherax.vip/lua-documentation/api-reference/natives/script) Last updated 4 years ago --- # begin_child | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_child#bool-begin_child-string-name-vec2-pos-vec2-bool-border-false-int-imguiwindowflags_-0) bool begin\_child(string name, vec2 pos = vec2(), bool border = false, int ImGuiWindowFlags\_ = 0) [Previousend\_window](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_window) [Nextend\_child](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_child) Last updated 4 years ago --- # set_next_window_pos | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_next_window_pos#void-set_next_window_pos-vec2-pos) void set\_next\_window\_pos(vec2 pos) [Previousset\_next\_window\_size](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_next_window_size) [Nextget\_window\_size](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_window_size) Last updated 4 years ago --- # get_display_size | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_display_size#vec2-get_display_size) vec2 get\_display\_size() [PreviousGlobals](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/globals) [Nextset\_next\_window\_size](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_next_window_size) Last updated 4 years ago --- # push_style_var | Lua Documentation void push\_style\_var(int ImGuiStyleVar\_, float|vec2) Copy g_imgui.push_style_var(ImGuiStyleVar_WindowBorderSize, 0.0); g_imgui.push_style_var(ImGuiStyleVar_WindowPadding, vec(0, 0)); [Previousget\_window\_pos](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_window_pos) [Nextpop\_style\_var](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/pop_style_var) Last updated 4 years ago --- # add_rect | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_rect#void-add_rect-vec2-min-vec2-max-int-r-int-g-int-b-float-rounding-0.f-float-thickness-1.f) void add\_rect(vec2 min, vec2 max, int r, int g, int b, float rounding = 0.f, float thickness = 1.f) [Previousadd\_circle\_filled](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_circle_filled) [Nextadd\_rect\_filled](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_rect_filled) Last updated 4 years ago --- # same_line | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/same_line#void-same_line) void same\_line() [Previousend\_child](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_child) [Nextnew\_line](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/new_line) Last updated 4 years ago --- # PED | Lua Documentation Copy int GET_GROUP_SIZE(int group) Hash GET_CURRENT_PED_WEAPON(Ped ped) vec3 GET_PED_LAST_WEAPON_IMPACT(Ped ped) bool IS_PED_IN_ANY_VEHICLE(Ped ped) void SET_GROUP_FORMATION(int groupId, int formationType) void SET_PED_AS_GROUP_MEMBER(Ped ped, int groupId) int GET_PED_GROUP_INDEX(Ped ped) int GET_PED_HEALTH(Ped ped) void SET_PED_HEALTH(Ped ped, int health) bool IS_PED_RAGDOLL(Ped ped) bool IS_PED_A_PLAYER(Ped ped) void SET_PED_INTO_VEHICLE(Ped ped, Vehicle vehicle, int seatIndex) int GET_PED_DRAWABLE_VARIATION(Ped ped, int componentId) int GET_PED_TEXTURE_VARIATION(Ped ped, int componentId) int GET_PED_PROP_INDEX(Ped ped, int componentId) int GET_PED_PROP_TEXTURE_INDEX(Ped ped, int componentId) void SET_PED_COMPONENT_VARIATION(Ped ped, int componentId, int drawableId, int textureId, int paletteId) void SET_PED_PROP_INDEX(Ped ped, int componentId, int drawableId, int TextureId, bool attach) void SET_PED_CAN_SWITCH_WEAPON(Ped ped, bool toggle) bool IS_PED_SHOOTING(Ped ped) int GET_PED_BONE_INDEX(Ped ped, int boneId) vec3 GET_PED_BONE_COORDS(Ped ped, int boneId, float offsetX, float offsetY, float offsetZ) Hash GET_PED_RELATIONSHIP_GROUP_HASH(Ped ped) void SET_PED_RELATIONSHIP_GROUP_HASH(Ped ped, Hash hash) Vehicle GET_VEHICLE_PED_IS_USING(Ped ped) void CLEAR_ALL_PED_PROPS(Ped ped) void CLEAR_PED_TASKS_IMMEDIATELY(Ped ped) void CLEAR_PED_BLOOD_DAMAGE(Ped ped) bool IS_PED_IN_VEHICLE(Ped ped, Vehicle vehicle, bool atGetIn) bool IS_PED_USING_ANY_SCENARIO(Ped ped) bool SET_PED_TO_RAGDOLL(Ped ped, int time1, int time2, int ragdollType) void SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(Ped ped, bool toggle) bool CAN_PED_RAGDOLL(Ped ped) void SET_PED_COMBAT_ABILITY(Ped ped, int abilityLevel) void SET_PED_MAX_HEALTH(Ped ped, int value) int GET_PED_MAX_HEALTH(Ped ped) void RESURRECT_PED(Ped ped) void SET_PED_COMBAT_MOVEMENT(Ped ped, int combatMovement) void SET_PED_COMBAT_RANGE(Ped ped, int combatRange) void SET_PED_COMBAT_ATTRIBUTES(Ped ped, int attributeId, bool enabled) void SET_PED_ACCURACY(Ped ped, int accuracy) Ped CREATE_PED(int pedType, Hash modelHash, float x, float y, float z, float heading, bool isNetwork, bool bScriptHostPed) int GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS(Ped ped, int componentId) int GET_NUMBER_OF_PED_TEXTURE_VARIATIONS(Ped ped, int componentId, int drawableId) int GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONS(Ped ped, int propId) int GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(Ped ped, int propId, int drawableId) void SET_PED_RANDOM_COMPONENT_VARIATION(Ped ped, int p1) void SET_PED_DEFAULT_COMPONENT_VARIATION(Ped ped) void SET_PED_MOVEMENT_CLIPSET(Ped ped, string clipSet, float transitionSpeed) void RESET_PED_MOVEMENT_CLIPSET(Ped ped, float p1) Ped CLONE_PED(Ped ped) void SET_PED_CONFIG_FLAG(Ped ped, int flagId, bool value) void SET_PED_DENSITY_MULTIPLIER_THIS_FRAME(float multiplier) void SET_SCENARIO_PED_DENSITY_MULTIPLIER_THIS_FRAME(float p0, float p1) int CREATE_GROUP(int unused) void REMOVE_GROUP(int groupId) void SET_PED_AS_GROUP_LEADER(Ped ped, int groupId) void REMOVE_PED_FROM_GROUP(Ped ped) bool IS_PED_GROUP_MEMBER(Ped ped, int groupId) void SET_GROUP_FORMATION_SPACING(int groupId, float p1, float p2, float p3) void RESET_GROUP_FORMATION_DEFAULT_SPACING(int groupHandle) void SET_PED_NEVER_LEAVES_GROUP(Ped ped, bool toggle) bool DOES_GROUP_EXIST(int groupId) bool IS_PED_IN_GROUP(Ped ped) void SET_CREATE_RANDOM_COPS(bool toggle) bool CAN_CREATE_RANDOM_COPS() bool IS_PED_SWIMMING(Ped ped) bool IS_PED_SWIMMING_UNDERWATER(Ped ped) void CLEAR_RELATIONSHIP_BETWEEN_GROUPS(Hash group1, Hash group2) void SET_RELATIONSHIP_BETWEEN_GROUPS(int relationship, Hash group1, Hash group2) void SET_PED_HEAD_BLEND_DATA(Ped ped, int shapeFirstID, int shapeSecondID, int shapeThirdID, int skinFirstID, int skinSecondID, int skinThirdID, float shapeMix, float skinMix, float thirdMix, bool isParent) void SET_PED_FACE_FEATURE(Ped ped, int index, float scale) int GET_PED_EYE_COLOR(Ped ped) void SET_PED_EYE_COLOR(Ped ped, int index) void SET_PED_HEAD_OVERLAY(Ped ped, int overlayID, int index, float opacity) int GET_PED_HEAD_OVERLAY_VALUE(Ped ped, int overlayID) void SET_PED_HEAD_OVERLAY_COLOR(Ped ped, int overlayID, int colorType, int colorID, int secondColorID) int GET_PED_ARMOR(Ped ped) void SET_PED_ARMOR(Ped ped, int amount) void SET_PED_FLEE_ATTRIBUTES(Ped ped, int attributeFlags, bool enable) void SET_PED_AS_ENEMY(Ped ped, bool toggle) Vehicle GET_VEHICLE_PED_IS_IN(Ped ped, bool includeLastVehicle) bool IS_PED_MODEL(Ped ped, Hash modelHash) Ped CREATE_RANDOM_PED(float posX, float posY, float posZ) bool IS_PED_ON_VEHICLE(Ped ped) bool IS_PED_IN_COMBAT(Ped ped, Ped target) Entity GET_PED_SOURCE_OF_DEATH(Ped ped) void SET_PED_FIRING_PATTERN(Ped ped, Hash patternHash) void SET_PED_SHOOT_RATE(Ped ped, int shootRate) void APPLY_DAMAGE_TO_PED(Ped ped, int damageAmount, bool p2, Any p3) int GET_PED_TYPE(Ped ped) void SET_PED_HAIR_COLOR(Ped ped, int colorID, int highlightColorID) [PreviousSCRIPT](https://docs.cherax.vip/lua-documentation/api-reference/natives/script) [NextMISC](https://docs.cherax.vip/lua-documentation/api-reference/natives/misc) Last updated 4 years ago --- # new_line | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/new_line#void-new_line) void new\_line() [Previoussame\_line](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/same_line) [Nextseparator](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/separator) Last updated 4 years ago --- # GRAPHICS | Lua Documentation Copy void REQUEST_NAMED_PTFX_ASSET(string fxName) bool HAS_NAMED_PTFX_ASSET_LOADED(string fxName) void REMOVE_NAMED_PTFX_ASSET(string fxName) void USE_PARTICLE_FX_ASSET(string name) int START_PARTICLE_FX_LOOPED_ON_ENTITY(string effectName, Entity entity, float xOffset, float yOffset, float zOffset, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis) bool START_PARTICLE_FX_NON_LOOPED_ON_ENTITY(string effectName, Entity entity, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, float scale, bool axisX, bool axisY, bool axisZ) int START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(string effectName, Entity entity, float xOffset, float yOffset, float zOffset, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis, Any p12, Any p13, Any p14, Any p15) bool START_NETWORKED_PARTICLE_FX_NON_LOOPED_ON_ENTITY(string effectName, Entity entity, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, float scale, bool axisX, bool axisY, bool axisZ) int START_PARTICLE_FX_LOOPED_AT_COORD(string effectName, float x, float y, float z, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis, bool p11) int START_PARTICLE_FX_NON_LOOPED_AT_COORD(string effectName, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis) bool START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(string effectName, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis, bool p11) void REMOVE_PARTICLE_FX(int ptfxHandle, bool p1) void REMOVE_PARTICLE_FX_IN_RANGE(float X, float Y, float Z, float radius) void SET_PARTICLE_FX_LOOPED_OFFSETS(int ptfxHandle, float x, float y, float z, float rotX, float rotY, float rotZ) void SET_PARTICLE_FX_LOOPED_EVOLUTION(int ptfxHandle, string propertyName, float amount, bool noNetwork) void SET_PARTICLE_FX_LOOPED_COLOUR(int ptfxHandle, float r, float g, float b, bool p4) void SET_PARTICLE_FX_LOOPED_ALPHA(int ptfxHandle, float alpha) void SET_PARTICLE_FX_LOOPED_SCALE(int ptfxHandle, float scale) void SET_PARTICLE_FX_LOOPED_FAR_CLIP_DIST(int ptfxHandle, float range) void ENABLE_CLOWN_BLOOD_VFX(bool toggle) void ENABLE_ALIEN_BLOOD_VFX(bool toggle) void ANIMPOSTFX_PLAY(string effectName, int duration, bool looped) void ANIMPOSTFX_STOP(string effectName) bool ANIMPOSTFX_IS_RUNNING(string effectName) void ANIMPOSTFX_STOP_ALL() int REQUEST_SCALEFORM_MOVIE(string scaleformName) bool BEGIN_SCALEFORM_MOVIE_METHOD(int scaleform, string methodName) void SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING(string string) void SCALEFORM_MOVIE_METHOD_ADD_PARAM_INT(int value) void SCALEFORM_MOVIE_METHOD_ADD_PARAM_FLOAT(float value) void SCALEFORM_MOVIE_METHOD_ADD_PARAM_BOOL(bool value) void DRAW_SCALEFORM_MOVIE_FULLSCREEN(int scaleform, int red, int green, int blue, int alpha, int unk) void DRAW_SCALEFORM_MOVIE(int scaleformHandle, float x, float y, float width, float height, int red, int green, int blue, int alpha, int unk) void END_SCALEFORM_MOVIE_METHOD() void DRAW_MARKER(int type, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ, int red, int green, int blue, int alpha, bool bobUpAndDown, bool faceCamera, int p19, bool rotate, string textureDict, string textureName, bool drawOnEnts) int CREATE_CHECKPOINT(int type, float posX1, float posY1, float posZ1, float posX2, float posY2, float posZ2, float diameter, int red, int green, int blue, int alpha, int reserved) void SET_CHECKPOINT_ICON_HEIGHT(int checkpoint, float scale) void SET_CHECKPOINT_CYLINDER_HEIGHT(int checkpoint, float nearHeight, float farHeight, float radius) void SET_CHECKPOINT_RGBA(int checkpoint, int red, int green, int blue, int alpha) void DELETE_CHECKPOINT(int checkpoint) bool HAS_SCALEFORM_MOVIE_LOADED(int scaleformHandle) void SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(int scaleform) [PreviousUI](https://docs.cherax.vip/lua-documentation/api-reference/natives/ui) [NextMOBILE](https://docs.cherax.vip/lua-documentation/api-reference/natives/mobile) Last updated 4 years ago --- # VEHICLE | Lua Documentation Copy void SET_VEHICLE_TYRE_SMOKE_COLOR(Vehicle vehicle, int r, int g, int b) Ped GET_PED_IN_VEHICLE_SEAT(Vehicle vehicle, int seatIndex, bool p2) void SET_VEHICLE_IS_STOLEN(Vehicle vehicle, bool isStolen) string GET_MOD_TEXT_LABEL(Vehicle vehicle, int modType, int modValue) string GET_MOD_SLOT_NAME(Vehicle vehicle, int modType) string GET_LIVERY_NAME(Vehicle vehicle, int liveryIndex) int GET_NUM_VEHICLE_MODS(Vehicle vehicle, int modType) void SET_VEHICLE_MOD(Vehicle vehicle, int modType, int modIndex, bool customTires) int GET_VEHICLE_MOD(Vehicle vehicle, int modType) void SET_VEHICLE_MOD_KIT(Vehicle vehicle, int modKit) void SET_VEHICLE_EXTRA(Vehicle vehicle, int extraId, bool disable) bool DOES_EXTRA_EXIST(Vehicle vehicle, int extraId) bool IS_VEHICLE_EXTRA_TURNED_ON(Vehicle vehicle, int extraId) void TOGGLE_VEHICLE_MOD(Vehicle vehicle, int modType, bool toggle) bool IS_VEHICLE_A_CONVERTIBLE(Vehicle vehicle, bool p1) int GET_CONVERTIBLE_ROOF_STATE(Vehicle vehicle) void SET_CONVERTIBLE_ROOF(Vehicle vehicle, bool p1) void SET_VEHICLE_INDICATOR_LIGHTS(Vehicle vehicle, int turnSignal, bool toggle) void SET_VEHICLE_BRAKE_LIGHTS(Vehicle vehicle, bool toggle) void SET_VEHICLE_CAN_BE_VISIBLY_DAMAGED(Vehicle vehicle, bool state) void SET_VEHICLE_ENGINE_ON(Vehicle vehicle, bool value, bool instantly, bool disableAutoStart) void SET_VEHICLE_FIXED(Vehicle vehicle) void SET_VEHICLE_DEFORMATION_FIXED(Vehicle vehicle) void SET_VEHICLE_UNDRIVEABLE(Vehicle vehicle, bool toggle) bool SET_VEHICLE_ON_GROUND_PROPERLY(Vehicle vehicle, float p1) void SET_VEHICLE_FORWARD_SPEED(Vehicle vehicle, float speed) void SET_VEHICLE_NUMBER_PLATE_TEXT(Vehicle vehicle, string plateText) void SET_VEHICLE_DOOR_OPEN(Vehicle vehicle, int doorId, bool loose, bool openInstantly) void SET_VEHICLE_DOORS_SHUT(Vehicle vehicle, bool closeInstantly) bool IS_TOGGLE_MOD_ON(Vehicle vehicle, int modType) void SET_VEHICLE_WHEEL_TYPE(Vehicle vehicle, int WheelType) void SET_VEHICLE_NUMBER_PLATE_INDEX(Vehicle vehicle, int plateIndex) void SET_VEHICLE_TYRES_CAN_BURST(Vehicle vehicle, bool toggle) void SET_VEHICLE_TYRE_BURST(Vehicle vehicle, int index, bool onRim, float p3) int GET_NUM_VEHICLE_MODS(Vehicle vehicle, int modType) bool IS_VEHICLE_ENGINE_RUNNING(Vehicle vehicle) void SET_VEHICLE_ENGINE_HEALTH(Vehicle vehicle, float health) bool IS_VEHICLE_DAMAGED(Vehicle vehicle) bool IS_VEHICLE_ON_ALL_WHEELS(Vehicle vehicle) Vehicle CREATE_VEHICLE(Hash modelHash, float x, float y, float z, float heading, bool isNetwork, bool bScriptHostVeh, bool p7) void SET_VEHICLE_DOORS_LOCKED(Vehicle vehicle, int doorLockStatus) void SET_VEHICLE_NEON_LIGHT_ENABLED(Vehicle vehicle, int index, bool toggle) bool IS_VEHICLE_NEON_LIGHT_ENABLED(Vehicle vehicle, int index) void SET_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(float multiplier) void SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(float multiplier) void SET_PARKED_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(float multiplier) void SET_AMBIENT_VEHICLE_RANGE_MULTIPLIER_THIS_FRAME(float value) bool IS_VEHICLE_ROCKET_BOOST_ACTIVE(Vehicle vehicle) void SET_VEHICLE_ROCKET_BOOST_ACTIVE(Vehicle vehicle, bool active) void SET_VEHICLE_ROCKET_BOOST_PERCENTAGE(Vehicle vehicle, float percentage) void SET_VEHICLE_ROCKET_BOOST_REFILL_TIME(Vehicle vehicle, float seconds) void CONTROL_LANDING_GEAR(Vehicle vehicle, int state) int GET_LANDING_GEAR_STATE(Vehicle vehicle) void SET_VEHICLE_LIVERY(Vehicle vehicle, int livery) int GET_VEHICLE_LIVERY(Vehicle vehicle) bool IS_VEHICLE_STOPPED(Vehicle vehicle) int GET_VEHICLE_NUMBER_OF_PASSENGERS(Vehicle vehicle) int GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(Vehicle vehicle) int GET_VEHICLE_MODEL_NUMBER_OF_SEATS(Hash modelHash) int GET_VEHICLE_LIVERY_COUNT(Vehicle vehicle) int GET_VEHICLE_ROOF_LIVERY_COUNT(Vehicle vehicle) bool IS_VEHICLE_MODEL(Vehicle vehicle, Hash model) bool IS_VEHICLE_STUCK_ON_ROOF(Vehicle vehicle) void SET_VEHICLE_DOORS_LOCKED_FOR_PLAYER(Vehicle vehicle, Player player, bool toggle) bool GET_VEHICLE_DOORS_LOCKED_FOR_PLAYER(Vehicle vehicle, Player player) void SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(Vehicle vehicle, bool toggle) void SET_VEHICLE_DOORS_LOCKED_FOR_NON_SCRIPT_PLAYERS(Vehicle vehicle, bool toggle) void SET_VEHICLE_DOORS_LOCKED_FOR_TEAM(Vehicle vehicle, int team, bool toggle) void EXPLODE_VEHICLE(Vehicle vehicle, bool isAudible, bool isInvisible, bool p3) void SET_VEHICLE_OUT_OF_CONTROL(Vehicle vehicle, bool killDriver, bool explodeOnImpact) void SET_VEHICLE_TIMED_EXPLOSION(Vehicle vehicle, Ped ped, bool toggle) void ADD_VEHICLE_PHONE_EXPLOSIVE_DEVICE(Vehicle vehicle) bool HAS_VEHICLE_PHONE_EXPLOSIVE_DEVICE() void DETONATE_VEHICLE_PHONE_EXPLOSIVE_DEVICE() void SET_TAXI_LIGHTS(Vehicle vehicle, bool state) bool IS_TAXI_LIGHT_ON(Vehicle vehicle) void SET_VEHICLE_COLOURS(Vehicle vehicle, int colorPrimary, int colorSecondary) void SET_VEHICLE_EXTRA_COLOURS(Vehicle vehicle, int pearlescentColor, int wheelColor) void SET_VEHICLE_FULLBEAM(Vehicle vehicle, bool toggle) void SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(Vehicle vehicle, int r, int g, int b) void CLEAR_VEHICLE_CUSTOM_PRIMARY_COLOUR(Vehicle vehicle) bool GET_IS_VEHICLE_PRIMARY_COLOUR_CUSTOM(Vehicle vehicle) void SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(Vehicle vehicle, int r, int g, int b) void CLEAR_VEHICLE_CUSTOM_SECONDARY_COLOUR(Vehicle vehicle) bool GET_IS_VEHICLE_SECONDARY_COLOUR_CUSTOM(Vehicle vehicle) string GET_LIVERY_NAME(Vehicle vehicle, int liveryIndex) void SET_VEHICLE_WINDOW_TINT(Vehicle vehicle, int tint) int GET_VEHICLE_WINDOW_TINT(Vehicle vehicle) void MODIFY_VEHICLE_TOP_SPEED(Vehicle vehicle, float value) void SET_HELI_BLADES_FULL_SPEED(Vehicle vehicle) void SET_HELI_BLADES_SPEED(Vehicle vehicle, float speed) void SET_VEHICLE_PARACHUTE_ACTIVE(Vehicle vehicle, bool active) bool DOES_VEHICLE_HAVE_PARACHUTE(Vehicle vehicle) bool CAN_VEHICLE_PARACHUTE_BE_ACTIVATED(Vehicle vehicle) void SET_VEHICLE_CAN_BE_LOCKED_ON(Vehicle vehicle, bool canBeLockedOn, bool unk) void SET_VEHICLE_HAS_BEEN_OWNED_BY_PLAYER(Vehicle vehicle, bool owned) void SET_VEHICLE_STEER_BIAS(Vehicle vehicle, float value) void SET_VEHICLE_REDUCE_GRIP(Vehicle vehicle, bool toggle) float GET_VEHICLE_ESTIMATED_MAX_SPEED(Vehicle vehicle) void SET_VEHICLE_TYRE_FIXED(Vehicle vehicle, int tyreIndex) int GET_VEHICLE_CLASS(Vehicle vehicle) void ATTACH_VEHICLE_TO_CARGOBOB(Vehicle vehicle, Vehicle cargobob, int p2, float x, float y, float z) void SET_CARGOBOB_PICKUP_MAGNET_ACTIVE(Vehicle cargobob, bool isActive) void SET_CARGOBOB_PICKUP_MAGNET_STRENGTH(Vehicle cargobob, float strength) void DETACH_VEHICLE_FROM_CARGOBOB(Vehicle vehicle, Vehicle cargobob) void SET_VEHICLE_XENON_LIGHTS_COLOR(Vehicle vehicle, int colorIndex) void SET_VEHICLE_NEON_LIGHTS_COLOR(Vehicle vehicle, int r, int g, int b) int GET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(Vehicle vehicle) STRING GET_VEHICLE_NUMBER_PLATE_TEXT(Vehicle vehicle) void SET_VEHICLE_SIREN(Vehicle vehicle, bool toggle) bool IS_VEHICLE_SIREN_ON(Vehicle vehicle) bool IS_VEHICLE_SIREN_AUDIO_ON(Vehicle vehicle) void SET_VEHICLE_STRONG(Vehicle vehicle, bool toggle) void REMOVE_VEHICLE_WINDOW(Vehicle vehicle, int windowIndex) void SET_VEHICLE_LIGHT_MULTIPLIER(Vehicle vehicle, float multiplier) void DELETE_ALL_TRAINS() Vehicle GET_RANDOM_VEHICLE_IN_SPHERE(float x, float y, float z, float radius, Hash modelHash, int flags) void SET_VEHICLE_DAMAGE(Vehicle vehicle, float xOffset, float yOffset, float zOffset, float damage, float radius, bool focusOnModel) float GET_VEHICLE_ENGINE_HEALTH(Vehicle vehicle) void SET_VEHICLE_ENGINE_HEALTH(Vehicle vehicle, float health) bool IS_VEHICLE_DRIVEABLE(Vehicle vehicle, bool isOnFireCheck) void START_VEHICLE_HORN(Vehicle vehicle, int duration, Hash mode, bool forever) [PreviousENTITY](https://docs.cherax.vip/lua-documentation/api-reference/natives/entity) [NextWEAPON](https://docs.cherax.vip/lua-documentation/api-reference/natives/weapon) Last updated 4 years ago --- # columns | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/columns#void-columns-int-count-1-bool-border-true) void columns(int count = 1, bool border = true) [Previousseparator](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/separator) [Nextnext\_column](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/next_column) Last updated 4 years ago --- # separator | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/separator#void-separator) void separator() [Previousnew\_line](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/new_line) [Nextcolumns](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/columns) Last updated 4 years ago --- # get_window_pos | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_window_pos#vec2-get_window_pos) vec2 get\_window\_pos() [Previousget\_window\_size](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_window_size) [Nextpush\_style\_var](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/push_style_var) Last updated 4 years ago --- # set_next_item_width | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_next_item_width#void-set_next_item_width-float-width) void set\_next\_item\_width(float width) [Previousadd\_rect\_filled](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_rect_filled) [Nextget\_content\_region\_avail](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_content_region_avail) Last updated 4 years ago --- # is_item_hovered | Lua Documentation bool is\_item\_hovered() [Previousset\_column\_offset](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_column_offset) [Nextadd\_line](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_line) Last updated 4 years ago --- # CONTROL | Lua Documentation Copy bool IS_CONTROL_ENABLED(int padIndex, int control) bool IS_CONTROL_PRESSED(int padIndex, int control) bool IS_CONTROL_RELEASED(int padIndex, int control) bool IS_CONTROL_JUST_PRESSED(int padIndex, int control) bool IS_CONTROL_JUST_RELEASED(int padIndex, int control) float GET_CONTROL_NORMAL(int padIndex, int control) bool IS_DISABLED_CONTROL_PRESSED(int padIndex, int control) bool IS_DISABLED_CONTROL_RELEASED(int padIndex, int control) bool IS_DISABLED_CONTROL_JUST_PRESSED(int padIndex, int control) bool IS_DISABLED_CONTROL_JUST_RELEASED(int padIndex, int control) void DISABLE_CONTROL_ACTION(int padIndex, int control, bool disable) void ENABLE_CONTROL_ACTION(int padIndex, int control, bool enable) void DISABLE_ALL_CONTROL_ACTIONS(int padIndex) void ENABLE_ALL_CONTROL_ACTIONS(int padIndex) bool SET_CONTROL_NORMAL(int padIndex, int control, float amount) [PreviousTASK](https://docs.cherax.vip/lua-documentation/api-reference/natives/task) [NextNETWORK](https://docs.cherax.vip/lua-documentation/api-reference/natives/network) Last updated 4 years ago --- # add_circle | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_circle#void-add_circle-vec2-center-float-radius-int-r-int-g-int-b-int-num_segments-12-float-thickness-1.f) void add\_circle(vec2 center, float radius, int r, int g, int b, int num\_segments = 12, float thickness = 1.f) [Previousadd\_line](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_line) [Nextadd\_circle\_filled](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_circle_filled) Last updated 4 years ago --- # next_column | Lua Documentation void next\_column() [Previouscolumns](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/columns) [Nextset\_column\_offset](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_column_offset) Last updated 4 years ago --- # add_line | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_line#void-add_line-vec2-p1-vec2-p2-int-r-int-g-int-b-float-thickness-1.f) void add\_line(vec2 p1, vec2 p2, int r, int g, int b, float thickness = 1.f) [Previousis\_item\_hovered](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/is_item_hovered) [Nextadd\_circle](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_circle) Last updated 4 years ago --- # add_button | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_button#bool-add_button-string-name-vec2-or-function-callback) bool add\_button(string name, vec2|function() callback) [Previousget\_content\_region\_avail](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_content_region_avail) [Nextadd\_checkbox](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_checkbox) Last updated 4 years ago --- # end_child | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_child#void-end_child) void end\_child() [Previousbegin\_child](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_child) [Nextsame\_line](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/same_line) Last updated 4 years ago --- # ENTITY | Lua Documentation Copy bool DOES_ENTITY_EXIST(Entity entity) vec3 GET_ENTITY_COORDS(Entity entity) void SET_ENTITY_COORDS_NO_OFFSET(Entity entity, float xPos, float yPos, float zPos) vec3 GET_ENTITY_ROTATION(Entity entity, int rotationOrder) void SET_ENTITY_ROTATION(Entity entity, float pitch, float roll, float yaw, int rotationOrder, bool p5) void SET_ENTITY_HEADING(Entity entity, float heading) void SET_ENTITY_VELOCITY(Entity entity, float x, float y, float z) vec3 GET_ENTITY_VELOCITY(Entity entity) bool IS_AN_ENTITY(int handle) bool IS_ENTITY_A_PED(Entity entity) bool IS_ENTITY_A_MISSION_ENTITY(Entity entity) bool IS_ENTITY_A_VEHICLE(Entity entity) bool IS_ENTITY_AN_OBJECT(Entity entity) bool IS_ENTITY_DEAD(Entity entity) bool IS_ENTITY_ON_FIRE(Entity entity) bool IS_ENTITY_VISIBLE(Entity entity) bool IS_ENTITY_ATTACHED(Entity entity) void SET_ENTITY_VISIBLE(Entity entity, bool toggle, bool unk) int GET_ENTITY_TYPE(Entity entity) void SET_ENTITY_GRAVITY(Entity entity, bool toggle) void APPLY_FORCE_TO_ENTITY(Entity entity, int forceFlags, float x, float y, float z, float offX, float offY, float offZ, int boneIndex, bool isDirectionRel, bool ignoreUpVec, bool isForceRel, bool p12, bool p13) Entity GET_ENTITY_ATTACHED_TO(Entity entity) void DELETE_ENTITY(Entity entity) void DETACH_ENTITY(Entity entity, bool dynamic, bool collision) Hash GET_ENTITY_MODEL(Entity entity) float GET_ENTITY_HEADING(Entity entity) void ATTACH_ENTITY_TO_ENTITY(Entity entity1, Entity entity2, int boneIndex, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, bool p9, bool useSoftPinning, bool collision, bool isPed, int vertexIndex, bool fixedRot) void SET_ENTITY_AS_MISSION_ENTITY(Entity entity, bool p1, bool p2) void SET_ENTITY_COLLISION(Entity entity, bool toggle, bool keepPhysics) bool IS_ENTITY_IN_AIR(Entity entity) void SET_ENTITY_AS_NO_LONGER_NEEDED(Entity entity) void FREEZE_ENTITY(Entity entity, bool toggle) vec3 GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(Entity entity, float offsetX, float offsetY, float offsetZ) void SET_ENTITY_ALPHA(Entity entity, int alphaLevel, bool skin) void RESET_ENTITY_ALPHA(Entity entity) void SET_ENTITY_INVINCIBLE(Entity entity, bool toggle) bool IS_ENTITY_IN_WATER(Entity entity) float GET_ENTITY_SPEED(Entity entity) void SET_ENTITY_LIGHTS(Entity entity, bool toggle) void SET_ENTITY_MAX_SPEED(Entity entity, float speed) float GET_ENTITY_PITCH(Entity entity) float GET_ENTITY_ROLL(Entity entity) float GET_ENTITY_PHYSICS_HEADING(Entity entity) bool DOES_ENTITY_HAVE_PHYSICS(Entity entity) vec3 GET_ENTITY_ROTATION_VELOCITY(Entity entity) float GET_ENTITY_SUBMERGED_LEVEL(Entity entity) int GET_ENTITY_POPULATION_TYPE(Entity entity) bool IS_ENTITY_STATIC(Entity entity) bool IS_ENTITY_IN_ZONE(Entity entity, string zone) bool IS_ENTITY_UPRIGHT(Entity entity, float angle) bool IS_ENTITY_UPSIDE_DOWN(Entity entity) bool HAS_ENTITY_BEEN_DAMAGED_BY_ANY_OBJECT(Entity entity) bool HAS_ENTITY_BEEN_DAMAGED_BY_ANY_PED(Entity entity) bool HAS_ENTITY_BEEN_DAMAGED_BY_ANY_VEHICLE(Entity entity) bool HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(Entity entity1, Entity entity2, bool p2) bool DOES_ENTITY_HAVE_DRAWABLE(Entity entity) bool HAS_ENTITY_COLLIDED_WITH_ANYTHING(Entity entity) int GET_ENTITY_BONE_INDEX_BY_NAME(Entity entity, string boneName) void APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(Entity entity, int forceType, float x, float y, float z, bool p5, bool isDirectionRel, bool isForceRel, bool p8) int GET_ENTITY_MAX_HEALTH(Entity entity) void SET_ENTITY_MAX_HEALTH(Entity entity, int value) vec3 GET_ENTITY_FORWARD_VECTOR(Entity entity) bool IS_ENTITY_ON_SCREEN(Entity entity) void SET_ENTITY_ANIM_CURRENT_TIME(Entity entity, string animDictionary, string animName, float time) void SET_ENTITY_ANIM_SPEED(Entity entity, string animDictionary, string animName, float speedMultiplier) void SET_ENTITY_HEALTH(Entity entity, int health, int p2) void SET_ENTITY_PROOFS(Entity entity, bool bulletProof, bool fireProof, bool explosionProof, bool collisionProof, bool meleeProof, bool p6, bool p7, bool drownProof) int GET_ENTITY_ALPHA(Entity entity) void CREATE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, bool p6) void REMOVE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, bool p6) [PreviousOBJECT](https://docs.cherax.vip/lua-documentation/api-reference/natives/object) [NextVEHICLE](https://docs.cherax.vip/lua-documentation/api-reference/natives/vehicle) Last updated 4 years ago --- # begin_tab_bar | Lua Documentation bool begin\_tab\_bar(string str\_id, int ImGuiTabBarFlags) [Previousmenu\_item](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/menu_item) [Nextend\_tab\_bar](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_tab_bar) Last updated 4 years ago --- # end_menu | Lua Documentation void end\_menu() [Previousbegin\_menu](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_menu) [Nextmenu\_item](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/menu_item) Last updated 4 years ago --- # begin_popup | Lua Documentation bool begin\_popup(string strId, int ImGuiWindowFlags = 0) [Previousis\_popup\_open](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/is_popup_open) [Nextend\_popup](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_popup) Last updated 4 years ago --- # end_main_menu_bar | Lua Documentation void end\_main\_menu\_bar() [Previousbegin\_main\_menu\_bar](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_main_menu_bar) [Nextbegin\_menu](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_menu) Last updated 4 years ago --- # get_content_region_avail | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_content_region_avail#vec2-get_content_region_avail) vec2 get\_content\_region\_avail() [Previousset\_next\_item\_width](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_next_item_width) [Nextadd\_button](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_button) Last updated 4 years ago --- # add_input_string_with_hint | Lua Documentation bool add\_input\_string\_with\_hint(string name, string hint, function(string) callback) [Previousadd\_input\_string](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_input_string) [Nextadd\_text](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_text) Last updated 3 years ago --- # add_triangle | Lua Documentation void add\_triangle(vec2 p1, vec2 p2, vec2 p3, int r, int g, int b, float thickness = 1.f) [Previousadd\_text](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_text) [Nextadd\_triangle\_filled](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_triangle_filled) Last updated 4 years ago --- # set_column_offset | Lua Documentation void set\_column\_offset(int idx, float offset) [Previousnext\_column](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/next_column) [Nextis\_item\_hovered](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/is_item_hovered) Last updated 4 years ago --- # add_input_string | Lua Documentation bool add\_input\_string(string name, function(string) callback) [Previousadd\_checkbox](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_checkbox) [Nextadd\_input\_string\_with\_hint](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_input_string_with_hint) Last updated 3 years ago --- # add_text | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_text#void-add_text-string-text) void add\_text(string text) [Previousadd\_input\_string\_with\_hint](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_input_string_with_hint) [Nextadd\_triangle](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_triangle) Last updated 4 years ago --- # add_rect_filled | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_rect_filled#void-add_rect_filled-vec2-min-vec2-max-int-r-int-g-int-b-float-rounding-0.f) void add\_rect\_filled(vec2 min, vec2 max, int r, int g, int b, float rounding = 0.f) [Previousadd\_rect](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_rect) [Nextset\_next\_item\_width](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/set_next_item_width) Last updated 4 years ago --- # add_checkbox | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_checkbox#bool-add_checkbox-string-name-function-bool-callback) bool add\_checkbox(string name, function(bool) callback) [Previousadd\_button](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_button) [Nextadd\_input\_string](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_input_string) Last updated 4 years ago --- # end_tab_item | Lua Documentation void end\_tab\_item() [Previousbegin\_tab\_item](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_tab_item) [Nextopen\_popup](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/open_popup) Last updated 4 years ago --- # end_popup | Lua Documentation void end\_popup() [Previousbegin\_popup](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_popup) [Nextg\_os](https://docs.cherax.vip/lua-documentation/api-reference/g_os) Last updated 4 years ago --- # add_circle_filled | Lua Documentation ### [](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_circle_filled#void-add_circle_filled-vec2-center-float-radius-int-r-int-g-int-b-int-num_segments-12) void add\_circle\_filled(vec2 center, float radius, int r, int g, int b, int num\_segments = 12) [Previousadd\_circle](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_circle) [Nextadd\_rect](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_rect) Last updated 4 years ago --- # close_current_popup | Lua Documentation void close\_current\_popup() [Previousopen\_popup](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/open_popup) [Nextis\_popup\_open](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/is_popup_open) Last updated 4 years ago --- # Globals | Lua Documentation Copy // Flags for ImGui::Begin() enum ImGuiWindowFlags_ { ImGuiWindowFlags_None = 0, ImGuiWindowFlags_NoTitleBar = 1 << 0, // Disable title-bar ImGuiWindowFlags_NoResize = 1 << 1, // Disable user resizing with the lower-right grip ImGuiWindowFlags_NoMove = 1 << 2, // Disable user moving the window ImGuiWindowFlags_NoScrollbar = 1 << 3, // Disable scrollbars (window can still scroll with mouse or programmatically) ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, // Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set. ImGuiWindowFlags_NoCollapse = 1 << 5, // Disable user collapsing window by double-clicking on it ImGuiWindowFlags_AlwaysAutoResize = 1 << 6, // Resize every window to its content every frame ImGuiWindowFlags_NoBackground = 1 << 7, // Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f). ImGuiWindowFlags_NoSavedSettings = 1 << 8, // Never load/save settings in .ini file ImGuiWindowFlags_NoMouseInputs = 1 << 9, // Disable catching mouse, hovering test with pass through. ImGuiWindowFlags_MenuBar = 1 << 10, // Has a menu-bar ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, // Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12, // Disable taking focus when transitioning from hidden to visible state ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, // Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus) ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14, // Always show vertical scrollbar (even if ContentSize.y < Size.y) ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15, // Always show horizontal scrollbar (even if ContentSize.x < Size.x) ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16, // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) ImGuiWindowFlags_NoNavInputs = 1 << 18, // No gamepad/keyboard navigation within the window ImGuiWindowFlags_NoNavFocus = 1 << 19, // No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) ImGuiWindowFlags_UnsavedDocument = 1 << 20, // Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse, ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, // [Internal] ImGuiWindowFlags_NavFlattened = 1 << 23, // [BETA] On child window: allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows. ImGuiWindowFlags_ChildWindow = 1 << 24, // Don't use! For internal use by BeginChild() ImGuiWindowFlags_Tooltip = 1 << 25, // Don't use! For internal use by BeginTooltip() ImGuiWindowFlags_Popup = 1 << 26, // Don't use! For internal use by BeginPopup() ImGuiWindowFlags_Modal = 1 << 27, // Don't use! For internal use by BeginPopupModal() ImGuiWindowFlags_ChildMenu = 1 << 28 // Don't use! For internal use by BeginMenu() // [Obsolete] //ImGuiWindowFlags_ResizeFromAnySide = 1 << 17, // --> Set io.ConfigWindowsResizeFromEdges=true and make sure mouse cursors are supported by backend (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) }; [Previousg\_imgui](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui) [Nextget\_display\_size](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/get_display_size) Last updated 4 years ago Copy enum ImGuiStyleVar_ { // Enum name --------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) ImGuiStyleVar_Alpha, // float Alpha ImGuiStyleVar_WindowPadding, // ImVec2 WindowPadding ImGuiStyleVar_WindowRounding, // float WindowRounding ImGuiStyleVar_WindowBorderSize, // float WindowBorderSize ImGuiStyleVar_WindowMinSize, // ImVec2 WindowMinSize ImGuiStyleVar_WindowTitleAlign, // ImVec2 WindowTitleAlign ImGuiStyleVar_ChildRounding, // float ChildRounding ImGuiStyleVar_ChildBorderSize, // float ChildBorderSize ImGuiStyleVar_PopupRounding, // float PopupRounding ImGuiStyleVar_PopupBorderSize, // float PopupBorderSize ImGuiStyleVar_FramePadding, // ImVec2 FramePadding ImGuiStyleVar_FrameRounding, // float FrameRounding ImGuiStyleVar_FrameBorderSize, // float FrameBorderSize ImGuiStyleVar_ItemSpacing, // ImVec2 ItemSpacing ImGuiStyleVar_ItemInnerSpacing, // ImVec2 ItemInnerSpacing ImGuiStyleVar_IndentSpacing, // float IndentSpacing ImGuiStyleVar_ScrollbarSize, // float ScrollbarSize ImGuiStyleVar_ScrollbarRounding, // float ScrollbarRounding ImGuiStyleVar_GrabMinSize, // float GrabMinSize ImGuiStyleVar_GrabRounding, // float GrabRounding ImGuiStyleVar_TabRounding, // float TabRounding ImGuiStyleVar_ButtonTextAlign, // ImVec2 ButtonTextAlign ImGuiStyleVar_SelectableTextAlign, // ImVec2 SelectableTextAlign ImGuiStyleVar_COUNT }; Copy // Flags for ImGui::BeginTabItem() enum ImGuiTabItemFlags_ { ImGuiTabItemFlags_None = 0, ImGuiTabItemFlags_UnsavedDocument = 1 << 0, // Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. Also: tab is selected on closure and closure is deferred by one frame to allow code to undo it without flicker. ImGuiTabItemFlags_SetSelected = 1 << 1, // Trigger flag to programmatically make the tab selected when calling BeginTabItem() ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. ImGuiTabItemFlags_NoPushId = 1 << 3 // Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem() }; Copy enum ImGuiTabBarFlags_ { ImGuiTabBarFlags_None = 0, ImGuiTabBarFlags_Reorderable = 1 << 0, // Allow manually dragging tabs to re-order them + New tabs are appended at the end of list ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1, // Automatically select new tabs when they appear ImGuiTabBarFlags_TabListPopupButton = 1 << 2, // Disable buttons to open the tab list popup ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4, // Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll) ImGuiTabBarFlags_NoTooltip = 1 << 5, // Disable tooltips when hovering a tab ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 6, // Resize tabs when they don't fit ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7, // Add scroll buttons when tabs don't fit ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll, ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown }; Copy enum ImGuiHoveredFlags_ { ImGuiHoveredFlags_None = 0, // Return true if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them. ImGuiHoveredFlags_ChildWindows = 1 << 0, // IsWindowHovered() only: Return true if any children of the window is hovered ImGuiHoveredFlags_RootWindow = 1 << 1, // IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) ImGuiHoveredFlags_AnyWindow = 1 << 2, // IsWindowHovered() only: Return true if any window is hovered ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 3, // Return true even if a popup window is normally blocking access to this item/window //ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 4, // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet. ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 5, // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns. ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 6, // Return true even if the position is obstructed or overlapped by another window ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7, // Return true even if the item is disabled ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped, ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows }; --- # begin_menu | Lua Documentation bool begin\_menu(string label, bool enabled = true) [Previousend\_main\_menu\_bar](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_main_menu_bar) [Nextend\_menu](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_menu) Last updated 4 years ago --- # menu_item | Lua Documentation bool menu\_item(string label) [Previousend\_menu](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_menu) [Nextbegin\_tab\_bar](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_tab_bar) Last updated 4 years ago --- # is_popup_open | Lua Documentation bool is\_popup\_open(string strId) [Previousclose\_current\_popup](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/close_current_popup) [Nextbegin\_popup](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_popup) Last updated 4 years ago --- # add_triangle_filled | Lua Documentation void add\_triangle\_filled(vec2 p1, vec2 p2, vec2 p3, int r, int g, int b) [Previousadd\_triangle](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_triangle) [Nextbegin\_main\_menu\_bar](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_main_menu_bar) Last updated 4 years ago --- # begin_main_menu_bar | Lua Documentation bool begin\_main\_menu\_bar() [Previousadd\_triangle\_filled](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/add_triangle_filled) [Nextend\_main\_menu\_bar](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_main_menu_bar) Last updated 4 years ago --- # end_tab_bar | Lua Documentation void end\_tab\_bar() [Previousbegin\_tab\_bar](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_tab_bar) [Nextbegin\_tab\_item](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/begin_tab_item) Last updated 4 years ago --- # begin_tab_item | Lua Documentation bool begin\_tab\_item(string label, int ImGuiTabItemFlags) [Previousend\_tab\_bar](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_tab_bar) [Nextend\_tab\_item](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_tab_item) Last updated 4 years ago --- # open_popup | Lua Documentation void open\_popup(string strId) [Previousend\_tab\_item](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/end_tab_item) [Nextclose\_current\_popup](https://docs.cherax.vip/lua-documentation/api-reference/g_imgui/close_current_popup) Last updated 4 years ago ---