QBCore Weapons
Add Weapons to Core
Note
qb-core/shared/weapons.lua - (End of Script)
[`weapon_huntingrifle`] = { name = 'weapon_huntingrifle', label = 'Hunting Rifle', weapontype = 'Sniper Rifle', ammotype = 'AMMO_HUNTINGRIFLE', damagereason = 'Sniped / Picked off / Scoped' },
[`weapon_crossbow`] = { name = 'weapon_crossbow', label = 'Hunting Crossbow', weapontype = 'Sniper Rifle', ammotype = 'AMMO_ARROW', damagereason = 'Sniped / Picked off / Scoped' },
QB-Weapons Config
Note
4. qb-weapons/config.lua - (Around Line 170) (Inside Config.DurabilityMultiplier)
weapon_huntingrifle = 0.15,
weapon_crossbow = 0.15,
QB-Weapons Recoil
Note
5. qb-weapons/client/recoil.lua - (Around Line 87) (Inside recoils table)
[`weapon_huntingrifle`] = 0.5,
[`weapon_crossbow`] = 0.05,
QB-Weapons Ammo
Important
Important Follow Closely Location Varies on Version
There are three unique versions of qb-weapons. To ensure proper setup, you’ll need to determine your version and follow the corresponding steps.
How to Identify Your Version
Follow the instructions below to determine which version you’re using. Once identified, follow the appropriate step for that version.
⚠️ Note: You only need to complete the step that matches your version!
How to Find Your qb-weapons Version
- Open
qb-weapons/server/main.luaand search forAmmoTypes:- If you see a table, follow Step A.
- Open
qb-weapons/config.luaand search forConfig.AmmoTypes:- If you see a table, follow Step B.
- Open
qb-weapons/server/main.luaand search foremp_ammo:- If you find a
CreateUsableItemfunction, paste the code from Part C directly beneath it.
- If you find a
Step 6a
File: qb-weapons/server/main.lua
Location: Around Line 217 (Inside AmmoTypes Table)
Add the following entries:
gg_hunting_arrowammo = { ammoType = 'AMMO_ARROW', amount = 25 },
gg_hunting_rifleammo = { ammoType = 'AMMO_HUNTINGRIFLE', amount = 10 },
Step 6b
File: qb-weapons/config.lua
Location: Around Line 12 (Inside Config.AmmoTypes Table)
Add the following entries:
gg_hunting_arrowammo = { ammoType = 'AMMO_ARROW', amount = 25 },
gg_hunting_rifleammo = { ammoType = 'AMMO_HUNTINGRIFLE', amount = 10 },
Step 6c
File: qb-weapons/server/main.lua
Location: Around Line 232
Paste the following code beneath the CreateUsableItem function:
QBCore.Functions.CreateUseableItem('gg_hunting_arrowammo', function(source, item)
TriggerClientEvent('qb-weapons:client:AddAmmo', source, 'AMMO_ARROW', 25, item)
end)
QBCore.Functions.CreateUseableItem('gg_hunting_rifleammo', function(source, item)
TriggerClientEvent('qb-weapons:client:AddAmmo', source, 'AMMO_HUNTINGRIFLE', 10, item)
end)
Ask in the Discord with your script name, framework, and the exact error.

