mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
Fix pickups not syncing server sided
This commit is contained in:
@@ -437,12 +437,15 @@ AddEventHandler('esx:onPickup', function(id)
|
||||
if pickup.type == 'item_standard' then
|
||||
if xPlayer.canCarryItem(pickup.name, pickup.count) then
|
||||
xPlayer.addInventoryItem(pickup.name, pickup.count)
|
||||
ESX.Pickups[id] = nil
|
||||
TriggerClientEvent('esx:removePickup', -1, id)
|
||||
end
|
||||
elseif pickup.type == 'item_money' then
|
||||
ESX.Pickups[id] = nil
|
||||
TriggerClientEvent('esx:removePickup', -1, id)
|
||||
xPlayer.addMoney(pickup.count)
|
||||
elseif pickup.type == 'item_account' then
|
||||
ESX.Pickups[id] = nil
|
||||
TriggerClientEvent('esx:removePickup', -1, id)
|
||||
xPlayer.addAccountMoney(pickup.name, pickup.count)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user