local gunshopcoords = {
{x = 22.40599, y = -1106.78, z = 29.797}
}
Citizen.CreateThread(function()
while true do
local ped = PlayerPedId()
local plyCoords = GetEntityCoords(ped, false)
Citizen.Wait(1)
for k in pairs(gunshopcoords) do
local distGunshop = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, gunshopcoords[k].x, gunshopcoords[k].y, gunshopcoords[k].z)
if distGunshop <= 2.0 then
DrawMarker(2, gunshopcoords[k].x, gunshopcoords[k].y, gunshopcoords[k].z, 0, 0, 0, 0, 0, 0, 0.101, 0.101, 0.1001, 0, 130, 255, 204, 0, 0, 0, 0)
if distGunshop <= 1.5 then
if IsControlJustReleased(1, 51) then
TriggerServerEvent('item:ver')
end
end
end
end
end
end)