Découvrez notre jeu  Défis Quiz !

Developpeur Web - Lua - Fivem

 GUEST-8SFY1U4JN6

🔹 Introduction 🔹



📢 Welcome to the MultiChest Documentation


MultiChest is a script designed to provide players with a secure chest system in FiveM. Whether it’s storing valuable items in a bank or customising specific locations, this tool enhances the RP experience by offering intuitive and secure management of players’ possessions.

Protected by FiveM Escrow, MultiChest offers highly detailed configuration through the config.lua file. You can customise markers, notifications, webhooks, and much more, all whilst maintaining the security of our source code. 🚀


⚙️ Prerequisites


To ensure MultiChest works correctly, please ensure the following resources are installed on your server:

▪️ es_extended
▪️ ox_lib
▪️ ox_inventory
▪️ oxmysql


📚 Database


                        
CREATE TABLE IF NOT EXISTS `user_chest` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner` varchar(50) NOT NULL,
  `name` varchar(50) NOT NULL,
  `name_chest` varchar(100) NOT NULL,
  `name_bank` varchar(100) NOT NULL,
  `weight` int(11) NOT NULL,
  `password` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `owner_index` (`owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
                        
                    

Upon launching the programme, MultiChest automatically creates the required database.

ℹ️ Information:

▪️ id: The chest’s identifier, which auto-increments with each new entry.
▪️ owner: The identifier of the chest’s owner.
▪️ name: Corresponds to the type of chest chosen by the player.
▪️ name_chest: The custom name assigned by the player.
▪️ name_bank: Indicates the bank associated with the chest.
▪️ weight: Represents the chest’s carrying capacity.
▪️ password: The password chosen by the player.


🔹 Principles 🔹


➡️ Pre-loading Points


This module configures interaction points for chests based on the settings defined in Config.CoffreLocations. It manages the display of visual markers and map indicators (blips), as well as player interactions when approaching.

🔧 Details:

▪️ For each position defined in Config.CoffreLocations, customisable blips (icon, size, colour, label) are added to the map.
▪️ Visual markers are displayed according to the parameters set in Config.Marker (type, colour, size, rotation, etc.).
▪️ Interactive zones detect the player’s presence and enable interaction via the [E] key.

This setup provides an immersive and seamless experience for locating and interacting with chests in-game. ➡️


🔓 Opening the Main Menu


This module displays a contextual menu allowing players to access their existing chests or rent a new one, depending on their proximity to an interaction point.

🔧 Details:

▪️ The script identifies the nearest bank by comparing the player’s coordinates with those defined in Config.CoffreLocations.
▪️ It then checks if the player already owns a chest at that bank.
     ▫️ If so, an option to access the chest is offered.
     ▫️ If not, only the renting option appears.
▪️ An interactive contextual menu displays the available actions.

This feature provides an intuitive interface tailored to the player’s location for managing their chests. 🔓


🛒 Opening the Chest Purchase Menu


This module enables players to rent a chest by selecting from the options available at the current bank, using an input interface to set the name and password.

🔧 Details:

▪️ It filters chests in Config.Coffres to show only those matching the player’s current bank, displaying name, price, taxes (based on weight), maximum weight, and number of slots.
▪️ A dialogue box collects the chest’s name and password before renting.
▪️ An event is triggered to finalise the rental by sending the details to the server.
▪️ If no chests are available, an error message appears in the menu.

This clear and efficient interface meets the specific needs of each bank for chest rentals. 🛒


📦 Opening the Player’s Chests Menu


This module displays a list of all chests rented by the player at the corresponding bank, offering options to open, rename, change the password, or delete a chest.

🔧 Details:

▪️ If the player has no chests, an error notification is shown.
▪️ The current bank is identified based on the player’s position.
▪️ A contextual menu lists each chest with its name (or a default name if none is set).
▪️ For each chest, a sub-menu offers options: open (via password), change password, rename, or delete.

This comprehensive management offers a rich and secure interface for tracking and administering the player’s chests. 📦


📋 Opening the Inventory Menu (OX_Inventory)


This module allows players to open a specific chest’s inventory using OX_Inventory, displaying and managing the items inside.

🔧 Details:

▪️ The selected chest is accessed via OX_Inventory, giving the player direct access to its contents.

This feature ensures smooth and integrated chest inventory management, enhancing the user experience. 📋


🔹 Configuration File 🔹


🎨 Marker Configuration


                        
Config.Marker = {
    id_type = 27,
    size_x = 0.3,
    size_y = 0.3,
    size_z = 0.3,
    color_red = 0,
    color_green = 150,
    color_blue = 150,
    color_opacity = 100,
    rotate = true,
}
                        
                    

This section lets you customise the visual markers indicating chest locations in-game. These serve as interaction points for players.

🔧 Available options:

▪️ id_type: Marker type (see FiveM docs for IDs).
▪️ size_x, size_y, size_z: Marker dimensions (length, width, height).
▪️ color_red, color_green, color_blue: RGB colours (0-255).
▪️ color_opacity: Opacity (0-255).
▪️ rotate: Enable/disable rotation (true/false).

Tailor the markers to perfectly fit your server! 🎯


📍 Blip Configuration


                        
Config.Blips = {
    activ_blips = true,
    icon = 272,
    display = 4,
    scale = 0.7,
    color = 2,
    activ_text_on_blip_bank_name = false,
    txt_blip_intro_bank_name = "[Chest]",
    txt_blip_intro_simple = "[Chest]",
}
                        
                    

Blips are icons displayed on the map to locate chests. This section allows you to configure them to your liking.

🔧 Available options:

▪️ activ_blips: Enable/disable blips (true/false).
▪️ icon: Icon ID (see FiveM docs).
▪️ display: Display type (4 = map + minimap).
▪️ scale: Blip size.
▪️ color: Colour (see FiveM docs).
▪️ activ_text_on_blip_bank_name: Show bank name.
▪️ txt_blip_intro_bank_name, txt_blip_intro_simple: Blip text.

Customise blips to guide your players effectively! 🗺️


🔔 Notification Configuration


                        
Config.Notifications = {
    position_error = "center-left",
    duration_error = 5000,
    position_success = "center-left",
    duration_success = 5000,
    position_warning = "center-left",
    duration_warning = 5000,
}
                        
                    

Notifications inform players about actions or errors related to chests. Adjust their position and duration for a better experience.

🔧 Available options:

▪️ position_error, position_success, position_warning: Screen position.
▪️ duration_error, duration_success, duration_warning: Duration in milliseconds.

Ensure messages are clear and well-placed! 📢


🌐 Webhook Configuration


                        
Config.Webhook = {
    webhook_use_only_one_logo = false,
    webhook_logo_defaut = "https://www.heickotv.xyz/multichest/multichest.png",
    webhook_logo_fleeca_bank = "https://www.heickotv.xyz/multichest/fleeca_bank.png",
    webhook_logs_activation = true,
    webhook_link_log = "https://discord.com/api/webhooks/...",
    txt_log_title_for_buy = "Chest Rental",
    txt_log_for_buy = "has rented",
    color_code_for_buy = 65280,
}
                        
                    

The webhook sends logs to Discord to track chest-related actions (purchases, modifications, deletions).

🔧 Available options:

▪️ webhook_use_only_one_logo: Use a single logo or one per bank.
▪️ webhook_logo_defaut, webhook_logo_fleeca_bank, etc.: Logo URLs.
▪️ webhook_logs_activation: Enable logs.
▪️ webhook_link_log: Discord webhook URL.
▪️ txt_log_title_for_buy, etc.: Log titles and text.
▪️ color_code_for_buy, etc.: Embed colours.

Keep an eye on activities with Discord! 🔗


✏️ Text Configuration


                        
Config.Text = {
    txt_button = "[E] - Manage Chests of",
    txt_first_head_menu = "Chest Management -",
    txt_my_chest = "📦 My Chests -",
    txt_access_chest = "📦 Access My Chests",
    -- (full list in config.lua)
}
                        
                    

Customise all text displayed in the interface and notifications for a fully immersive experience.

🔧 Available options:

▪️ txt_button: Interaction button text.
▪️ txt_first_head_menu: Menu header.
▪️ txt_my_chest: Label for personal chests.

Tailor the language to your community! 📝


🔒 Limit Configuration


                        
Config.Limit = {
    chest_limit_per_player = 15,
}
                        
                    

Set a limit on the number of chests a player can own.

🔧 Available options:

▪️ chest_limit_per_player: Maximum number of chests.

Balance the economy and gameplay! ⚖️


📌 Location Configuration


                        
Config.CoffreLocations = {
    { coords = vector3(251.24, 220.82, 106.35), 
      bank_type = "FleecaBank", 
      bank_name = "Pacific Bank - Vinewood Blvd." },
    -- (full list in config.lua)
}
                        
                    

Add locations where players can interact with chests.

🔧 Available options:

▪️ coords: Coordinates (x, y, z).
▪️ bank_type: Bank type (FleecaBank, Mazebank, or SavingBank).
▪️ bank_name: Bank name.

Place your chests wherever you like! 📍


📦 Chest Configuration


                        
Config.Coffres = {
    { name = "Small Chest", 
      weight = 50000, 
      price = 1000, 
      nb_slot = 10, 
      bank_name = "Pacific Bank - Vinewood Blvd." },
    -- (full list in config.lua)
}
                        
                    

Define the types of chests available for rent.

🔧 Available options:

▪️ name: Chest name.
▪️ weight: Capacity (in grams).
▪️ price: Rental price.
▪️ nb_slot: Number of slots.
▪️ bank_name: Associated bank.

Offer a variety of chests to your players! 🎁


💰 Tax Configuration


                        
Config.Taxes = {
    enable = true,
    percent = 2.0,
    nb_hour_between_two_samples = 6,
}
                        
                    

Add a tax system for rented chests.

🔧 Available options:

▪️ enable: Enable/disable taxes.
▪️ percent: Tax percentage.
▪️ nb_hour_between_two_samples: Interval between collections (in hours).

Simulate a realistic economy! 💸

SUIVEZ-NOUS !
Discord Twitter Instagram Facebook

Classement
Règlement
 
 
 
Inscription
Connexion
 
 
 
Discord
X (Twitter)
Instagram
Facebook