Setup
Setup client config
First, we need to configure the ImagesPath option. This is essential for the system to locate the correct path to load the item's image in the interface.
If you are using ox_inventory
, set the ImagesPath
to:
ImagesPath = 'nui://ox_inventory/web/images/'
If you are using qb-inventory
, set the ImagesPath
to:
ImagesPath = 'nui://qb-inventory/html/images/'
If you are not using either of these or if the path is a web link, you should enter the link without the .png
extension. For example:
Original link: https://r2.fivemanage.com/ryfJZiNwBGGSsHzTvTa2B/bandage.png
You should set it as:
ImagesPath = 'https://r2.fivemanage.com/ryfJZiNwBGGSsHzTvTa2B/'
Setup available items for loot
First, we need to create the item categories with all the available items that will be used later. For example, if you are setting up a medical items category with three medical items and a ammo category with some ammo, it would look like this:
Next, we need to define which categories will be available for each object. For example, for a broken car model (prop_rub_carwreck_2), we want players to be able to find medical items and ammunition. The configuration would look like this::
Whenever a player encounters this object and it is available for looting, the player will have the opportunity to find all the items defined within the specified categories. The items will be distributed according to the defined quantities and probabilities. For example, if the prop_rub_carwreck_2 is set to provide items from the "medical" and "ammo" categories: The player may find various medical items such as bandages and first aid kits, as defined within the "medical" category. Similarly, the player may find ammunition items, as defined within the "ammo" category. The actual items and their quantities will be determined based on the configuration for each category and the chance assigned.
Extra settings
Now that the essential configurations are complete, you should proceed to the client and server configuration files (config_client.lua
and config_server.lua
) to finalize the remaining settings according to your preferences.
In these files, you will find various settings along with explanations for each one. Adjust the configurations as needed to match your desired setup.
config_client.lua
: This file contains client-specific settings. Customize it to control how the client-side of the system behaves.config_server.lua
: This file contains server-specific settings. Modify it to manage server-side behavior and interactions.
Be sure to review the explanations provided in these files for each configuration option to ensure you set everything correctly according to your requirements.
Last updated