Addon weapons
Welcome to Addon weapons
For this section, if you do not have the minimum knowledge, or an experienced developer, avoid modifying or integrating custom weapons to your server to avoid errors, or problems with the inventory resource, with this we make clear that a support will not help you to configure a section like this to your server.
Now knowing that some basic skills are expected for this, we will make it as a brief guide and explained in the best way for users of our inventory can get to get varieties of weapons.
With the first step make sure to add the weapon and attachments in
qb-core/shared/items
and add only the weapon inqb-core/shared/weapons.lua
. After these 2 steps, you must add the weapons in theqb-smallresources/client/weapondrop.lua
and inqb-smallresources/client/weapondraw.lua
, when you have these steps ready with the examples of each file, we can continue with the following steps to make it compatible with the inventory.In the second step we have the integration of the Usable Items, and for this in the Addon attachments section is fully explained for you to understand them, but to continue with the tutorial of implementation of a custom weapon, we will make the example that our example weapon comes with 4 attachments so this will add it in
[inventory]\qs-inventory\server\custom\misc\CreateUsableItem.lua
In the addon attachments section, you will find the different categories that you can assign to your attachments, this to be able to place some of these items in the attachment slot of the weapon.
And as last step, we have the configuration of the weapon in the
weapons.lua
, where we will assign the durability of the weapon and assign the corresponding attachments that can be assigned, you can find the file mentioned in[inventory]\qs-inventory\config\weapons.lua
And if all goes well, you now have a custom weapon with 4 attachments ready to use with our inventory system, so we hope this will motivate the community to bring varied content.
Last updated