Skip to content

Commit

Permalink
Added ability to spawn pickup at any given coordinate
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenshiin13 committed Aug 20, 2023
1 parent aa1ea63 commit 92d6f49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions [core]/es_extended/server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down

0 comments on commit 92d6f49

Please sign in to comment.