# Table of Contents - [Welcome | YimMenuV2 - Lua Docs](#welcome-yimmenuv2-lua-docs) - [Log | YimMenuV2 - Lua Docs](#log-yimmenuv2-lua-docs) - [Script | YimMenuV2 - Lua Docs](#script-yimmenuv2-lua-docs) - [Stats | YimMenuV2 - Lua Docs](#stats-yimmenuv2-lua-docs) - [Notify | YimMenuV2 - Lua Docs](#notify-yimmenuv2-lua-docs) - [Tunables | YimMenuV2 - Lua Docs](#tunables-yimmenuv2-lua-docs) - [Util | YimMenuV2 - Lua Docs](#util-yimmenuv2-lua-docs) - [Natives | YimMenuV2 - Lua Docs](#natives-yimmenuv2-lua-docs) - [Invoker | YimMenuV2 - Lua Docs](#invoker-yimmenuv2-lua-docs) - [Network | YimMenuV2 - Lua Docs](#network-yimmenuv2-lua-docs) - [Transactions | YimMenuV2 - Lua Docs](#transactions-yimmenuv2-lua-docs) - [Entity | YimMenuV2 - Lua Docs](#entity-yimmenuv2-lua-docs) - [Vehicle | YimMenuV2 - Lua Docs](#vehicle-yimmenuv2-lua-docs) - [Ped | YimMenuV2 - Lua Docs](#ped-yimmenuv2-lua-docs) - [Script Global | YimMenuV2 - Lua Docs](#script-global-yimmenuv2-lua-docs) - [Vector3 | YimMenuV2 - Lua Docs](#vector3-yimmenuv2-lua-docs) - [Log | YimMenuV2 - Lua Docs](#log-yimmenuv2-lua-docs) - [Vector3 | YimMenuV2 - Lua Docs](#vector3-yimmenuv2-lua-docs) --- # Welcome | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send To begin scripting with YimMenu, you'll need to place your `.lua` script files into the `scripts` folder located in your YimMenu directory (`%AppData%/Roaming/YimMenu/scripts`). Once in-game, you can load and manage your scripts through the "Settings > LUA Scripts" menu. [NextLogchevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/log) Last updated 1 month ago --- # Log | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `log.verbose(message)` Logs a verbose message. `log.info(message)` Logs an informational message. `log.warn(message)` Logs a warning message. `log.error(message)` Logs an error message. `log.trace(message)` Logs a message with a full stack trace. [PreviousWelcomechevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs) [NextNotifychevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/notify) Last updated 1 month ago --- # Script | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `script.run_in_callback(function)` Executes the given function in a separate, persistent coroutine, allowing for looped actions. `script.yield(milliseconds)` Pauses the execution of the current script callback for a specified duration. **Must be called from within a coroutine (e.g., inside** `**script.run_in_callback**`**)**. `script.is_inside_callback()` Returns `true` if the current execution is within a script callback. `script.register_event_handler(event_name, function)` Registers a function to be called when a specific game event occurs. `event_name` can be a string or a Joaat hash. [PreviousNotifychevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/notify) [NextStatschevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/stats) Last updated 1 month ago --- # Stats | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `stats.set_int(stat_name, value)` Sets the value of an integer stat. `stats.set_bool(stat_name, value)` Sets the value of a boolean stat. `stats.set_float(stat_name, value)` Sets the value of a float stat. `stats.set_string(stat_name, value)` Sets the value of a string stat. `stats.set_packed_int(index, value)` Sets a packed integer stat at a given index. `stats.set_packed_bool(index, value)` Sets a packed boolean stat at a given index. `stats.set_packed_bool_range(start_index, end_index, value)` Sets a range of packed boolean stats to a specific value. `stats.get_int(stat_name)` Returns the integer value of a stat. `stats.get_bool(stat_name)` Returns the boolean value of a stat. `stats.get_float(stat_name)` Returns the float value of a stat. `stats.get_string(stat_name)` Returns the string value of a stat. `stats.get_packed_int(index)` Returns the value of a packed integer stat. `stats.get_packed_bool(index)` Returns the value of a packed boolean stat. [PreviousScriptchevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/script) [NextTunableschevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/tunables) Last updated 1 month ago --- # Notify | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `notify.success(title, message)` Shows a success notification. `notify.info(title, message)` Shows an informational notification. `notify.warn(title, message)` Shows a warning notification. `notify.error(title, message)` Shows an error notification. [PreviousLogchevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/log) [NextScriptchevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/script) Last updated 1 month ago --- # Tunables | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `tunables.set_int(tunable_hash, value)` Sets an integer tunable. `tunables.set_bool(tunable_hash, value)` Sets a boolean tunable. `tunables.set_float(tunable_hash, value)` Sets a float tunable. `tunables.get_int(tunable_hash)` Returns the integer value of a tunable. `tunables.get_bool(tunable_hash)` Returns the boolean value of a tunable. `tunables.get_float(tunable_hash)` Returns the float value of a tunable. [PreviousStatschevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/stats) [NextUtilchevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/util) Last updated 1 month ago --- # Util | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `util.joaat(string)` Converts a string into its Joaat hash integer representation. [PreviousTunableschevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/tunables) [NextNativeschevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/natives) Last updated 1 month ago --- # Natives | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `natives.load_natives()` Loads the native function definitions into the script's environment. This should be called before using any native functions. `natives.are_natives_loaded()` Returns `true` if the natives have been loaded for the current script. Once loaded, natives can be called using their namespace and name, for example: `PLAYER.PLAYER_PED_ID()`. [PreviousUtilchevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/util) [NextNetworkchevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/network) Last updated 1 month ago --- # Invoker | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send [PreviousTransactionschevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/transactions) [NextVector3chevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/vector3) --- # Network | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `network.trigger_script_event(event_hash, player_bitset, param_format, ...)` Triggers a remote script event on other players in the session. [PreviousNativeschevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/natives) [NextTransactionschevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/transactions) Last updated 1 month ago --- # Transactions | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `transactions.can_use_transactions()` Returns `true` if network shopping services are available. `transactions.run_service(category, action, item, value)` Executes a single "fire and forget" transaction. `transactions.create_basket(category, action)` Creates a new basket transaction object for more complex, multi-item transactions. #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/transactions#baskettransaction-object) BasketTransaction Object Method Description `:add_item(primary_item, secondary_item, value, stat_value, quantity)` Adds an item to the basket. `:run()` Executes the basket transaction. This is a latent function and must be called accordingly. [PreviousNetworkchevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/network) [NextInvokerchevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/invoker) Last updated 1 month ago --- # Entity | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/entity#constructor) Constructor * `Entity.new(handle)` - Creates an entity object from a game handle. #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/entity#methods) Methods * `:get_handle()` - Returns the entity's handle. * `:is_valid()` - Checks if the entity exists in the game world. * `:get_position()`, `:get_rotation()`, `:get_velocity()`, `:get_heading()` - Getters for physical properties. * `:set_position(vector3)`, `:set_rotation(vector3)`, `:set_velocity(vector3)`, `:set_heading(value)` - Setters for physical properties. * `:delete()` - Deletes the entity. * `:has_control()` - Checks if the local player has network control over the entity. * `:request_control(timeout)` - Requests network control. This is a latent function. * And many more for managing health, visibility, collision, etc. [PreviousVector3chevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/vector3) [NextPedchevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/ped) Last updated 1 month ago --- # Vehicle | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/vehicle#constructor) Constructor * `Vehicle.new(handle)` - Creates a vehicle object. * `Vehicle.create(model_hash, position, heading)` - Creates a new vehicle. This is a latent function. #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/vehicle#methods) Methods * `:fix()` - Repairs the vehicle. * `:upgrade()` - Applies all available performance upgrades. * `:get_plate_text()`, `:set_plate_text(text)` - Get or set the license plate text. * `:is_seat_free(seat_index)` - Checks if a vehicle seat is unoccupied. * `:supports_boost()`, `:is_boost_active()`, `:set_boost_charge(value)` - Manage vehicle boosts (e.g., KERS). * And many more for managing speed, gears, and physical state. [PreviousPedchevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/ped) [NextScript Globalchevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/script-global) Last updated 1 month ago --- # Ped | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/ped#constructor) Constructor * `Ped.new(handle)` - Creates a ped object. * `Ped.create(model_hash, position, heading)` - Creates a new ped in the world. This is a latent function. #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/ped#methods) Methods * `:get_vehicle()` - Returns the `Vehicle` the ped is in. * `:set_in_vehicle(vehicle, seat_index)` - Puts the ped into a vehicle seat. * `:give_weapon(weapon_hash, equip_now)` - Gives a weapon to the ped. * `:teleport_to(vector3)` - Teleports the ped to a specific location. * And many more for managing weapons, armor, groups, and tasks. [PreviousEntitychevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/entity) [NextVehiclechevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/vehicle) Last updated 1 month ago --- # Script Global | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/script-global#constructor) Constructor * `ScriptGlobal.new(global_id)` - Creates a reference to a global variable. #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/script-global#methods) Methods * `:at(index, size)` - Offsets the global pointer to access elements within an array or structure. * `:get_int()`, `:get_float()` - Reads the value at the global's address as an integer or float. * `:set_int(value)`, `:set_float(value)` - Writes a value to the global's address. [PreviousVehiclechevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/vehicle) Last updated 1 month ago --- # Vector3 | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/vector3#constructor) Constructor * `Vector3.new()` - Creates a zero vector. * `Vector3.new(x, y, z)` - Creates a vector with the specified coordinates. #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/vector3#methods) Methods * `:get_coords()` - Returns the x, y, and z components. * `:get_x()`, `:get_y()`, `:get_z()` - Get individual components. * `:set_x(value)`, `:set_y(value)`, `:set_z(value)` - Set individual components. * `:get_distance(other_vector3)` - Calculates the distance to another vector. [PreviousInvokerchevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/invoker) [NextEntitychevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/entity) Last updated 1 month ago --- # Log | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send Function Description `log.verbose(message)` Logs a verbose message. `log.info(message)` Logs an informational message. `log.warn(message)` Logs a warning message. `log.error(message)` Logs an error message. `log.trace(message)` Logs a message with a full stack trace. [PreviousWelcomechevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs) [NextNotifychevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/notify) Last updated 1 month ago --- # Vector3 | YimMenuV2 - Lua Docs GitBook Assistant GitBook Assistant Working...Thinking... close GitBook Assistant ##### Good evening I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? chevron-upchevron-down Ctrli AI Based on your contextquestion-circle Send #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes#constructor) Constructor * `Vector3.new()` - Creates a zero vector. * `Vector3.new(x, y, z)` - Creates a vector with the specified coordinates. #### [hashtag](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes#methods) Methods * `:get_coords()` - Returns the x, y, and z components. * `:get_x()`, `:get_y()`, `:get_z()` - Get individual components. * `:set_x(value)`, `:set_y(value)`, `:set_z(value)` - Set individual components. * `:get_distance(other_vector3)` - Calculates the distance to another vector. [PreviousInvokerchevron-left](https://percilator.gitbook.io/yimmenuv2-lua-docs/globals/invoker) [NextEntitychevron-right](https://percilator.gitbook.io/yimmenuv2-lua-docs/classes/entity) Last updated 1 month ago ---