Installation
Welcome to the Dynamic Weapons installation guide, here you can learn how to install our product completely, by following each step, we'll get a clean and smooth installation where you won't find any problems.
Please follow the information below step-by-step before opening a support request on Discord. If you encounter a problem despite the documentation, please open a ticket on the Discord server, giving as much detail as possible about your problem.
Download and installation
Once you've purchased the asset in the store, you can retrieve it from your portal.
Simply drag the folder ux_dynamicweapons contained in the .zip file into your server's resource folder, add the line below to your server.cfg file and restart your server !
If you have any problems with the Escrow System, please read this page and do what it says.
Configuration
You can edit the /configs/config.lua file to adapt the script as you wish.
Start by modifying the framework on which your server runs, usually ESX or QBCore. The line to edit is the one below:
UXConfig.Framework = "esx" --[[
"esx": ESX Legacy
"qb": QBCore
"esx": ESX Legacy
"custom": Custom Framework, need to change /client/frameworks.lua and /server/frameworks.lua
]]Adapt the script for inventory
If you use ox_inventory, you don't have much to configure. The script is preconfigured for ox_inventory, so if you have another inventory, you can of course make it work with it.
Client functions
The client functions to be edited are located in /client/frameworks.lua, some of which are already written for most inventories. If you're using a specific inventory that doesn't work like the ones already made, you may need to add some code to make it compatible.
Here you need to call the function that corresponds to what you want to return (one of the functions you've already written or one you've written yourself).
Warning ! If you write the function yourself, you must return a table as in this data example:
Server functions
Server functions are located in /server/frameworks.lua, and are the same as client functions. The difference is the way the data is retrieved, depending on the targeted player (source), otherwise the principle remains the same.
Warning ! If you write the function yourself, the principle of the function must remain the same as the client, except that the data retrieval corresponds to a specific player, and therefore takes the player's source as an argument, for example:
Last updated