Improved bad pickup code

This commit is contained in:
ElPumpo
2020-04-20 23:57:14 +02:00
parent 0647f4e77f
commit c375761c6f
2 changed files with 23 additions and 62 deletions
+4 -6
View File
@@ -258,11 +258,9 @@ ESX.CreatePickup = function(type, name, count, label, playerId, components, tint
local xPlayer = ESX.GetPlayerFromId(playerId)
ESX.Pickups[pickupId] = {
type = type,
name = name,
count = count,
label = label,
coords = xPlayer.getCoords(),
type = type, name = name,
count = count, label = label,
coords = xPlayer.getCoords()
}
if type == 'item_weapon' then
@@ -270,7 +268,7 @@ ESX.CreatePickup = function(type, name, count, label, playerId, components, tint
ESX.Pickups[pickupId].tintIndex = tintIndex
end
TriggerClientEvent('esx:createPickup', -1, pickupId, label, playerId, type, name, components, tintIndex)
TriggerClientEvent('esx:createPickup', -1, pickupId, label, xPlayer.getCoords(), type, name, components, tintIndex)
ESX.PickupId = pickupId
end