Buying weapon no longer removes it from the players inventory, fixes #74

This commit is contained in:
ElPumpo
2018-05-19 10:45:39 +02:00
parent a81866bce8
commit c1c4b585aa
2 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -362,11 +362,13 @@ ESX.RegisterServerCallback('esx_policejob:getArmoryWeapons', function(source, cb
end)
ESX.RegisterServerCallback('esx_policejob:addArmoryWeapon', function(source, cb, weaponName)
ESX.RegisterServerCallback('esx_policejob:addArmoryWeapon', function(source, cb, weaponName, removeWeapon)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeWeapon(weaponName)
if removeWeapon then
xPlayer.removeWeapon(weaponName)
end
TriggerEvent('esx_datastore:getSharedDataStore', 'society_police', function(store)