mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 10:18:54 +00:00
Fix thrown items not synced with mid-joined players
This commit is contained in:
@@ -162,16 +162,19 @@ ESX.GetItemLabel = function(item)
|
||||
end
|
||||
end
|
||||
|
||||
ESX.CreatePickup = function(type, name, count, label, player)
|
||||
ESX.CreatePickup = function(type, name, count, label, playerId)
|
||||
local pickupId = (ESX.PickupId == 65635 and 0 or ESX.PickupId + 1)
|
||||
local xPlayer = ESX.GetPlayerFromId(playerId)
|
||||
|
||||
ESX.Pickups[pickupId] = {
|
||||
type = type,
|
||||
name = name,
|
||||
count = count
|
||||
count = count,
|
||||
label = label,
|
||||
coords = xPlayer.getCoords()
|
||||
}
|
||||
|
||||
TriggerClientEvent('esx:pickup', -1, pickupId, label, player)
|
||||
TriggerClientEvent('esx:pickup', -1, pickupId, label, playerId)
|
||||
ESX.PickupId = pickupId
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user