Fixed "Changing ones own access is not permitted"

This commit is contained in:
ElPumpo
2020-04-22 12:25:55 +02:00
parent c8381b1b4e
commit 990feb9ca9
2 changed files with 4 additions and 2 deletions
+3 -2
View File
@@ -256,11 +256,12 @@ end
ESX.CreatePickup = function(type, name, count, label, playerId, components, tintIndex)
local pickupId = (ESX.PickupId == 65635 and 0 or ESX.PickupId + 1)
local xPlayer = ESX.GetPlayerFromId(playerId)
local coords = xPlayer.getCoords()
ESX.Pickups[pickupId] = {
type = type, name = name,
count = count, label = label,
coords = xPlayer.getCoords()
coords = coords
}
if type == 'item_weapon' then
@@ -268,7 +269,7 @@ ESX.CreatePickup = function(type, name, count, label, playerId, components, tint
ESX.Pickups[pickupId].tintIndex = tintIndex
end
TriggerClientEvent('esx:createPickup', -1, pickupId, label, xPlayer.getCoords(), type, name, components, tintIndex)
TriggerClientEvent('esx:createPickup', -1, pickupId, label, coords, type, name, components, tintIndex)
ESX.PickupId = pickupId
end