From 92d6f49464fbffc2f5431c06f560637eb457302a Mon Sep 17 00:00:00 2001 From: Ilias Rbayti <63159154+Kenshiin13@users.noreply.github.com> Date: Sun, 20 Aug 2023 18:56:25 +0200 Subject: [PATCH] Added ability to spawn pickup at any given coordinate --- [core]/es_extended/server/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index a9aa47c5..e01fe1f5 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -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 }