local burgershotcoords = {
{x = ABC, y = ABC, z = ABC},
}
Citizen.CrateThread(function()
while true do
local ped = PlayerPedId()
local plyCoords = GetEntityCoords(ped, false)
Citizen.Wait(1)
for k in pairs(burgershotcoords) do
local distBurgershot = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, burgershotcoords[k].x, burgershotcoords[k].y, burgershotcoords[k].z)
if distBurgershot <= 4.0 then
DrawMarker (2, burgershotcoords[k].x, burgershotcoords[k].y, burgershotcoords[k].z, 0, 0, 0, 0, 0, 0, 0.101, 0.1001, 0, 130, 255, 204, 0, 0, 0, 0)
if distBurgershot <= 0.5 then
if IsControlJustReleased(1, 51) then
BurgerShot()
end
end
end
end
end
end)
function BurgerShot()
ESX.PlayerData = xPlayer
TriggerServerEvent("inventory:server:OpenInventory", "shop", "BurgerShot", Config.BurgerShotItems)
end