mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 02:08:55 +00:00
Merge pull request #257 from Sojobo/master
Fix attachment pricing in armory
This commit is contained in:
+3
-3
@@ -403,14 +403,14 @@ ESX.RegisterServerCallback('esx_policejob:buyWeapon', function(source, cb, weapo
|
||||
|
||||
-- Weapon Component
|
||||
elseif type == 2 then
|
||||
local price = selectedWeapon.components[weaponComponent]
|
||||
local price = selectedWeapon.components[componentNum]
|
||||
local weaponNum, weapon = ESX.GetWeapon(weaponName)
|
||||
|
||||
local component = weapon.components[componentNum]
|
||||
|
||||
if component then
|
||||
if xPlayer.getMoney() >= selectedWeapon.price then
|
||||
xPlayer.removeMoney(selectedWeapon.price)
|
||||
if xPlayer.getMoney() >= price then
|
||||
xPlayer.removeMoney(price)
|
||||
xPlayer.addWeaponComponent(weaponName, component.name)
|
||||
|
||||
cb(true)
|
||||
|
||||
Reference in New Issue
Block a user