Page cover

🧠How to Install

FiveStar Script

Requirements

Before starting, make sure you have the latest version of qb_target Script installed on your server

You can fully customize the config file and customize the qb_target or qb_inventory or ox_invnetory scripts

Add Ammo item

#1 Make sure that all ammo item are registered in your inventory system.

Befor starting it, go to qb-core/shared/items.lua and add the following items

Config.Ammos = { 
    ["5.56mm"] = { Name = "5.56x45mm", Price = 10, Count = 20 },
    ["7.62mm"] = { Name = "7.62x39mm", Price = 10, Count = 20 },
    ["9mm"] = { Name = "9x19mm", Price = 10, Count = 20 },
    ["12_gauge"] = { Name = "12ga Rifled", Price = 10, Count = 20 },
    ["25_acp"] = { Name = ".25ACP Auto", Price = 10, Count = 20 },
    ["32_acp"] = { Name = "32ACP Auto", Price = 10, Count = 20 },
    ["44_magnum"] = { Name = ".357 Magnum", Price = 10, Count = 20 },
    ["45_acp"] = { Name = "45ACP Auto", Price = 10, Count = 20 },
    ["50mm_bmg"] = { Name = ".50 BMG", Price = 10, Count = 20 },
    ["54r"] = { Name = "7.62x39mm", Price = 10, Count = 20 },
    ["rocket"] = { Name = "Rocket", Price = 10, Count = 20 },
    ["grenade"] = { Name = "Grenade", Price = 10, Count = 20 },
    ["ammo_laser"] = { Name = "Laser charge", Price = 5000, Count = 250 },
}

Example:

["5.56mm"]              = { name = '5.56mm', label = '5.56x45mm', weight = 4, type = 'item', image = '5.56mm.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = '5.56x45mm for a weapon' },
...

#2 Open qb-core/shared/items.lua, This is qb default ammo, delete these

#3 Open qb-weapon/server/main.lua, line 208 to 222 is the ammo register code, delete it

Pay attention to the photo πŸ‘‡

#4 Open qb-weapons/client/main.lua, find register net event weapons:client:AddAmmo and replace it with the above code

#5 Open qb-core/shared/weapons.lua, all weapons are there and ammotype is written in front of it edit it

Register attachments

If you use ox_inventory, some of the weapon components are not added by the ox team and the list is not complete, the script does not encounter problems, but you cannot remove some attachments from the weapon.

Last updated