Closed RayaanUddin closed 9 months ago
Also Requires changes made to qb-inventory for weapon tints to work... Hi there, I have found a solution!!!
In qb-inventory > client > main.lua,
Search for: RegisterNetEvent('inventory:client:UseWeapon', function(weaponData, shootbool)
inside event, replace ...
else
TriggerEvent('weapons:client:DrawWeapon', nil)
TriggerEvent('weapons:client:SetCurrentWeapon', weaponData, shootbool)
local ammo = tonumber(weaponData.info.ammo) or 0
by ...
else
TriggerEvent('weapons:client:DrawWeapon', nil)
TriggerEvent('weapons:client:SetCurrentWeapon', weaponData, shootbool)
local ammo = tonumber(weaponData.info.ammo) or 0
local tint = tonumber(weaponData.info.tint) or 0
and replace ...
GiveWeaponToPed(ped, weaponHash, ammo, false, false)
SetPedAmmo(ped, weaponHash, ammo)
SetCurrentPedWeapon(ped, weaponHash, true)
by...
GiveWeaponToPed(ped, weaponHash, ammo, false, false)
SetPedAmmo(ped, weaponHash, ammo)
SetCurrentPedWeapon(ped, weaponHash, true)
SetPedWeaponTintIndex(ped, weaponHash, tint)
Any help, ask me on discord RayaanUddin#6541.
This PR has had 60 days of inactivity & will close within 7 days
Changes made in qb-weapon allows the tint number to be saved in the database under the weapon items info in player inventory.
Changes made to client/main.lua:
Changes made to server/main.lua:
Describe Pull request First, make sure you've read and are following the contribution guidelines and style guide and your code reflects that. Write up a clear and concise description of what your pull request adds or fixes and if it's an added feature explain why you think it should be included in the core.
If your PR is to fix an issue mention that issue here
Questions (please complete the following information):