Added ability to spawn pickup at any given coordinate

This commit is contained in:
Ilias Rbayti
2023-08-20 18:56:25 +02:00
parent aa1ea636e4
commit 92d6f49464
+2 -2
View File
@@ -469,10 +469,10 @@ function ESX.GetUsableItems()
end
if not Config.OxInventory then
function ESX.CreatePickup(type, name, count, label, playerId, components, tintIndex)
function ESX.CreatePickup(type, name, count, label, playerId, components, tintIndex, coords)
local pickupId = (Core.PickupId == 65635 and 0 or Core.PickupId + 1)
local xPlayer = ESX.Players[playerId]
local coords = xPlayer.getCoords(true)
coords = ( (type(coords) == "vector3" or type(coords) == "vector4") and coords.xyz or xPlayer.getCoords(true))
Core.Pickups[pickupId] = { type = type, name = name, count = count, label = label, coords = coords }