Main/resources/[inventory]/omi-warehouse/shared/shared.lua
2025-06-15 04:13:56 +02:00

25 lines
No EOL
1 KiB
Lua

local QBCore = exports["qb-core"]:GetCoreObject()
RegisterNetEvent('QBCore:Client:UpdateObject', function() QBCore = exports['qb-core']:GetCoreObject() end)
function makeBlip(data)
local blip = AddBlipForCoord(data.coords)
SetBlipAsShortRange(blip, true)
SetBlipSprite(blip, data.sprite or 1)
SetBlipColour(blip, data.col or 0)
SetBlipScale(blip, data.scale or 0.5)
-- SetBlipDisplay(blip, (data.disp or 6))
BeginTextCommandSetBlipName('STRING')
AddTextComponentString(tostring(data.name) or 'Delivery Job')
EndTextCommandSetBlipName(blip)
if Config.Debug then print("^5Debug^7: ^6Blip ^2created for location^7: '^6"..data.name.."^7'") end
return blip
end
function getStreet() return currentStreetName end
function getStreetandZone(coords)
local zone = GetLabelText(GetNameOfZone(coords.x, coords.y, coords.z))
local currentStreetHash = GetStreetNameAtCoord(coords.x, coords.y, coords.z)
currentStreetName = GetStreetNameFromHashKey(currentStreetHash)
playerStreetsLocation = currentStreetName .. ", " .. zone
return playerStreetsLocation
end