mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-02 03:08:52 +00:00
Buying weapon no longer removes it from the players inventory, fixes #74
This commit is contained in:
+4
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user