Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local shopData = nil
- ESX = nil
- Keys = {
- ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
- ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177,
- ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18,
- ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182,
- ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81,
- ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70,
- ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178,
- ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173,
- ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118
- }
- local Licenses = {}
- --[[Citizen.CreateThread(function()
- while ESX == nil do
- TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
- Citizen.Wait(0)
- end
- while ESX.GetPlayerData().job == nil do
- Citizen.Wait(10)
- end
- ESX.PlayerData = ESX.GetPlayerData()
- end)--]]
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- player = GetPlayerPed(-1)
- coords = GetEntityCoords(player)
- if IsInRegularShopZone(coords) or IsInRobsLiquorZone(coords) or IsInYouToolZone(coords) or IsInZvejybaZone(coords) or IsInIllegalZone(coords) or IsInWeaponShopZone(coords) or IsInPoliceShop then
- if IsInPoliceShop(coords) then
- --if IsControlJustReleased(0, Keys["E"]) and ESX.PlayerData.job and ESX.PlayerData.job.name == 'police' then
- if IsControlJustReleased(0, Keys["E"]) then
- --if ESX.PlayerData.job.name == "police" then
- OpenJobShopInv("policeshop")
- Citizen.Wait(2000)
- -- end
- end
- end
- if IsInRegularShopZone(coords) then
- if IsControlJustReleased(0, Keys["E"]) then
- OpenShopInv("regular")
- Citizen.Wait(2000)
- end
- end
- if IsInRobsLiquorZone(coords) then
- if IsControlJustReleased(0, Keys["E"]) then
- OpenShopInv("robsliquor")
- Citizen.Wait(2000)
- end
- end
- if IsInYouToolZone(coords) then
- if IsControlJustReleased(0, Keys["E"]) then
- OpenShopInv("youtool")
- Citizen.Wait(2000)
- end
- end
- if IsInZvejybaZone(coords) then
- if IsControlJustReleased(0, Keys["E"]) then
- OpenShopInv("zvejyba")
- Citizen.Wait(2000)
- end
- end
- if IsInIllegalZone(coords) then
- if IsControlJustReleased(0, Keys["E"]) then
- OpenShopInv("illegal")
- Citizen.Wait(2000)
- end
- end
- if IsInWeaponShopZone(coords) then
- if currentAction then
- ESX.ShowHelpNotification(currentActionMsg)
- if IsControlJustReleased(0, Keys["E"]) then
- ESX.TriggerServerCallback('esx_license:checkLicense', function(hasWeaponLicense)
- if hasWeaponLicense then
- OpenShopInv("weaponshop")
- Citizen.Wait(2000)
- else
- exports['mythic_notify']:DoHudText('error', _U('license_check_fail'))
- end
- end, GetPlayerServerId(PlayerId()), 'weapon')
- end
- end
- end
- end
- end
- end)
- function OpenJobShopInv(shoptype)
- text = "Parduotuvė"
- data = {text = text}
- inventory = {}
- ESX.TriggerServerCallback("suku:getJobShopItems", function(shopInv)
- for i=1, #shopInv, 1 do
- table.insert(inventory, shopInv[i])
- end
- end, shoptype)
- Citizen.Wait(500)
- TriggerEvent("esx_inventoryhud:openShopInventory", data, inventory)
- end
- function OpenShopInv(shoptype)
- text = "Parduotuvė"
- data = {text = text}
- inventory = {}
- ESX.TriggerServerCallback("suku:getShopItems", function(shopInv)
- for i = 1, #shopInv, 1 do
- table.insert(inventory, shopInv[i])
- end
- end, shoptype)
- Citizen.Wait(500)
- TriggerEvent("esx_inventoryhud:openShopInventory", data, inventory)
- end
- RegisterNetEvent("suku:OpenCustomShopInventory")
- AddEventHandler("suku:OpenCustomShopInventory", function(type, shopinventory)
- text = "Parduotuvė"
- data = {text = text}
- inventory = {}
- ESX.TriggerServerCallback("suku:getCustomShopItems", function(shopInv)
- for i = 1, #shopInv, 1 do
- table.insert(inventory, shopInv[i])
- end
- end, type, shopinventory)
- Citizen.Wait(500)
- TriggerEvent("esx_inventoryhud:openShopInventory", data, inventory)
- end)
- RegisterNetEvent("esx_inventoryhud:openShopInventory")
- AddEventHandler("esx_inventoryhud:openShopInventory", function(data, inventory)
- setShopInventoryData(data, inventory, weapons)
- openShopInventory()
- end)
- function setShopInventoryData(data, inventory)
- shopData = data
- SendNUIMessage(
- {
- action = "setInfoText",
- text = data.text
- }
- )
- items = {}
- SendNUIMessage(
- {
- action = "setShopInventoryItems",
- itemList = inventory
- }
- )
- end
- function openShopInventory()
- loadPlayerInventory()
- isInInventory = true
- SendNUIMessage(
- {
- action = "display",
- type = "shop"
- }
- )
- SetNuiFocus(true, true)
- end
- RegisterNUICallback("TakeFromShop", function(data, cb)
- if IsPedSittingInAnyVehicle(playerPed) then
- return
- end
- if type(data.number) == "number" and math.floor(data.number) == data.number then
- TriggerServerEvent("suku:SellItemToPlayer", GetPlayerServerId(PlayerId()), data.item.type, data.item.name, tonumber(data.number))
- end
- Wait(150)
- loadPlayerInventory()
- cb("ok")
- end
- )
- RegisterNetEvent("suku:AddAmmoToWeapon")
- AddEventHandler("suku:AddAmmoToWeapon", function(hash, amount)
- AddAmmoToPed(GetPlayerPed(-1), hash, amount)
- end)
- function IsInPoliceShop(coords)
- PoliceShop = Config.JobShops.PoliceShop.Locations
- for i = 1, #PoliceShop, 1 do
- if GetDistanceBetweenCoords(coords, PoliceShop[i].x, PoliceShop[i].y, PoliceShop[i].z, true) < 1.5 then
- SetTextComponentFormat("STRING")
- AddTextComponentString("Spauskite ~INPUT_VEH_HORN~, kad atidarytumete parduotuve")
- DisplayHelpTextFromStringLabel(0, 0, 0, -1)
- return true
- end
- end
- return false
- end
- function IsInRegularShopZone(coords)
- RegularShop = Config.Shops.RegularShop.Locations
- for i = 1, #RegularShop, 1 do
- if GetDistanceBetweenCoords(coords, RegularShop[i].x, RegularShop[i].y, RegularShop[i].z, true) < 1.5 then
- SetTextComponentFormat("STRING")
- AddTextComponentString("Spauskite ~INPUT_VEH_HORN~, kad atidarytumete ~g~parduotuves~s~ meniu.")
- DisplayHelpTextFromStringLabel(0, 0, 0, -1)
- return true
- end
- end
- return false
- end
- function IsInRobsLiquorZone(coords)
- RobsLiquor = Config.Shops.RobsLiquor.Locations
- for i = 1, #RobsLiquor, 1 do
- if GetDistanceBetweenCoords(coords, RobsLiquor[i].x, RobsLiquor[i].y, RobsLiquor[i].z, true) < 1.5 then
- SetTextComponentFormat("STRING")
- AddTextComponentString("Spauskite ~INPUT_VEH_HORN~, kad atidarytumete ~p~alkoholio parduotuves~s~ meniu.")
- DisplayHelpTextFromStringLabel(0, 0, 0, -1)
- return true
- end
- end
- return false
- end
- function IsInWeaponShopZone(coords)
- WeaponShop = Config.Shops.WeaponShop.Locations
- for i = 1, #WeaponShop, 1 do
- if GetDistanceBetweenCoords(coords, WeaponShop[i].x, WeaponShop[i].y, WeaponShop[i].z, true) < 1.5 then
- SetTextComponentFormat("STRING")
- AddTextComponentString("Spauskite ~INPUT_VEH_HORN~, kad atidarytumete ~p~alkoholio parduotuves~s~ meniu.")
- DisplayHelpTextFromStringLabel(0, 0, 0, -1)
- return true
- end
- end
- return false
- end
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- LicenseShop = Config.Shops.LicenseShop.Locations
- player = GetPlayerPed(-1)
- coords = GetEntityCoords(player)
- for i = 1, #LicenseShop, 1 do
- if GetDistanceBetweenCoords(coords, LicenseShop[i].x, LicenseShop[i].y, LicenseShop[i].z, true) < 8.0 then
- DrawMarker(25, LicenseShop[i].x, LicenseShop[i].y, LicenseShop[i].z - 0.99, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.MarkerSize.x, Config.MarkerSize.y, Config.MarkerSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, nil, nil, false)
- if currentAction then
- ESX.ShowHelpNotification(_U('license_shop_help'))
- if IsControlJustReleased(0, 38) then
- ESX.TriggerServerCallback('esx_license:checkLicense', function(hasWeaponLicense)
- if hasWeaponLicense then
- exports['mythic_notify']:DoHudText('error', _U('license_shop_check'))
- else
- OpenBuyLicenseMenu()
- Citizen.Wait(2000)
- end
- end, GetPlayerServerId(PlayerId()), Config.License.Weapon)
- end
- end
- end
- end
- end
- end)
- Citizen.CreateThread(function()
- while true do
- Player = nil
- Citizen.Wait(0)
- local playerCoords = GetEntityCoords(PlayerPedId())
- local isInMarker, letSleep, currentZone = false, false
- for k,v in pairs(Config.Shops) do
- for i = 1, #v.Locations, 1 do
- local distance = GetDistanceBetweenCoords(playerCoords, v.Locations[i].x, v.Locations[i].y, v.Locations[i].z, true)
- if distance < 1.5 then
- letSleep = false
- if distance < Config.MarkerSize.x then
- isInMarker = true
- currentZone = k
- lastZone = k
- end
- end
- end
- end
- if isInMarker and not hasAlreadyEnteredMarker then
- hasAlreadyEnteredMarker = true
- TriggerEvent('suku:hasEnteredMarker', currentZone)
- end
- if not isInMarker and hasAlreadyEnteredMarker then
- hasAlreadyEnteredMarker = false
- TriggerEvent('suku:hasExitedMarker', lastZone)
- end
- if letSleep then
- Citizen.Wait(500)
- end
- end
- end)
- AddEventHandler('suku:hasEnteredMarker', function(zone)
- currentAction = 'shop_menu'
- currentActionMsg = _U('shop_press_menu')
- currentActionData = {zone = zone}
- end)
- function OpenBuyLicenseMenu()
- ESX.UI.Menu.CloseAll()
- ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_license',{
- title = _U('license_shop_title'),
- elements = {
- { label = _U('yes') ..' (€' .. Config.LicensePrice ..')', value = 'yes' },
- { label = _U('no'), value = 'no' },
- }
- },
- function (data, menu)
- if data.current.value == 'yes' then
- ESX.TriggerServerCallback('suku:buyLicense', function(bought)
- if bought then
- menu.close()
- end
- end)
- end
- end,
- function (data, menu)
- menu.close()
- end)
- end
- function IsInYouToolZone(coords)
- YouTool = Config.Shops.YouTool.Locations
- for i = 1, #YouTool, 1 do
- if GetDistanceBetweenCoords(coords, YouTool[i].x, YouTool[i].y, YouTool[i].z, true) < 1.5 then
- SetTextComponentFormat("STRING")
- AddTextComponentString("Spauskite ~INPUT_VEH_HORN~, kad atidarytumete ~b~irankiu parduotuves~s~ meniu.")
- DisplayHelpTextFromStringLabel(0, 0, 0, -1)
- return true
- end
- end
- return false
- end
- function IsInZvejybaZone(coords)
- Zvejyba = Config.Shops.Zvejyba.Locations
- for i = 1, #Zvejyba, 1 do
- if GetDistanceBetweenCoords(coords, Zvejyba[i].x, Zvejyba[i].y, Zvejyba[i].z, true) < 1.5 then
- SetTextComponentFormat("STRING")
- AddTextComponentString("Spauskite ~INPUT_VEH_HORN~, kad atidarytumete ~b~zvejybos parduotuves~s~ meniu.")
- DisplayHelpTextFromStringLabel(0, 0, 0, -1)
- return true
- end
- end
- return false
- end
- function IsInIllegalZone(coords)
- Illegal = Config.Shops.Illegal.Locations
- for i = 1, #Illegal, 1 do
- if GetDistanceBetweenCoords(coords, Illegal[i].x, Illegal[i].y, Illegal[i].z, true) < 1.5 then
- SetTextComponentFormat("STRING")
- AddTextComponentString("Spauskite ~INPUT_VEH_HORN~, kad atidarytumete ~b~irankiu parduotuves~s~ meniu.")
- DisplayHelpTextFromStringLabel(0, 0, 0, -1)
- return true
- end
- end
- return false
- end
- RegisterNetEvent('suku:GetLicenses')
- AddEventHandler('suku:GetLicenses', function (licenses)
- for i = 1, #licenses, 1 do
- Licenses[licenses[i].type] = true
- end
- end)
- Citizen.CreateThread(function()
- player = GetPlayerPed(-1)
- coords = GetEntityCoords(player)
- for k, v in pairs(Config.Shops.RegularShop.Locations) do
- CreateBlip(vector3(Config.Shops.RegularShop.Locations[k].x, Config.Shops.RegularShop.Locations[k].y, Config.Shops.RegularShop.Locations[k].z ), "Parduotuve", 3.0, Config.ColorShop, Config.ShopBlipID, 0.8)
- end
- for k, v in pairs(Config.Shops.RobsLiquor.Locations) do
- CreateBlip(vector3(Config.Shops.RobsLiquor.Locations[k].x, Config.Shops.RobsLiquor.Locations[k].y, Config.Shops.RobsLiquor.Locations[k].z ), "Alkoholio Parduotuve", 3.0, Config.ColorLiqour, Config.LiquorBlipID, 0.8)
- end
- for k, v in pairs(Config.Shops.WeaponShop.Locations) do
- CreateBlip(vector3(Config.Shops.WeaponShop.Locations[k].x, Config.Shops.WeaponShop.Locations[k].y, Config.Shops.WeaponShop.Locations[k].z ), "Ginklu Parduotuve", 3.0, Config.ColorWeaponShop, Config.WeaponShopBlipID, 0.5)
- end
- for k, v in pairs(Config.Shops.LicenseShop.Locations) do
- CreateBlip(vector3(Config.Shops.LicenseShop.Locations[k].x, Config.Shops.LicenseShop.Locations[k].y, Config.Shops.LicenseShop.Locations[k].z ), "Ginklu Parduotuve", 3.0, Config.ColorLicenseShop, Config.LicenseShopBlipID, 0.5)
- end
- for k, v in pairs(Config.Shops.Zvejyba.Locations) do
- CreateBlip(vector3(Config.Shops.Zvejyba.Locations[k].x, Config.Shops.Zvejyba.Locations[k].y, Config.Shops.Zvejyba.Locations[k].z ), "Zvejybos Parduotuve", 3.0, Config.ColorZvejyba, Config.ZvejybaBlipID, 0.5)
- end
- for k, v in pairs(Config.Shops.YouTool.Locations) do
- CreateBlip(vector3(Config.Shops.YouTool.Locations[k].x, Config.Shops.YouTool.Locations[k].y, Config.Shops.YouTool.Locations[k].z ), "Irankiu Parduotuve", 3.0, Config.ColorYouTool, Config.YouToolBlipID, 0.5)
- end
- end)
- AddEventHandler('suku:hasEnteredMarker', function(zone)
- currentAction = 'shop_menu'
- currentActionMsg = _U('shop_press_menu')
- currentActionData = {zone = zone}
- end)
- AddEventHandler('suku:hasExitedMarker', function(zone)
- SendNUIMessage({
- display = false,
- clear = true
- })
- currentAction = false
- SetNuiFocus(false, false)
- end)
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- player = GetPlayerPed(-1)
- coords = GetEntityCoords(player)
- for k, v in pairs(Config.Shops.RegularShop.Locations) do
- if GetDistanceBetweenCoords(coords, Config.Shops.RegularShop.Locations[k].x, Config.Shops.RegularShop.Locations[k].y, Config.Shops.RegularShop.Locations[k].z, true) < 15.0 then
- ESX.Game.Utils.DrawText3D(vector3(Config.Shops.RegularShop.Locations[k].x, Config.Shops.RegularShop.Locations[k].y, Config.Shops.RegularShop.Locations[k].z + 1.0), "Spausk ~r~[E]~s~ kad patektum i parduotuves meniu", 0.6, 4)
- DrawMarker(29, Config.Shops.RegularShop.Locations[k].x, Config.Shops.RegularShop.Locations[k].y, Config.Shops.RegularShop.Locations[k].z+1, 0, 0, 0, 0, 0, 0, 0.3, 0.1, 0.3, 82, 255, 84, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.RegularShop.Locations[k].x, Config.Shops.RegularShop.Locations[k].y, Config.Shops.RegularShop.Locations[k].z+1.15, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- DrawMarker(20,Config.Shops.RegularShop.Locations[k].x, Config.Shops.RegularShop.Locations[k].y, Config.Shops.RegularShop.Locations[k].z+0.85, 0, 0, 0, 0, 180.0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- end
- end
- for k, v in pairs(Config.Shops.RobsLiquor.Locations) do
- if GetDistanceBetweenCoords(coords, Config.Shops.RobsLiquor.Locations[k].x, Config.Shops.RobsLiquor.Locations[k].y, Config.Shops.RobsLiquor.Locations[k].z, true) < 15.0 then
- DrawMarker(29, Config.Shops.RobsLiquor.Locations[k].x, Config.Shops.RobsLiquor.Locations[k].y, Config.Shops.RobsLiquor.Locations[k].z+1, 0, 0, 0, 0, 0, 0, 0.3, 0.1, 0.3, 241, 150, 255, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.RobsLiquor.Locations[k].x, Config.Shops.RobsLiquor.Locations[k].y, Config.Shops.RobsLiquor.Locations[k].z+1.15, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.RobsLiquor.Locations[k].x, Config.Shops.RobsLiquor.Locations[k].y, Config.Shops.RobsLiquor.Locations[k].z+0.85, 0, 0, 0, 0, 180.0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- ESX.Game.Utils.DrawText3D(vector3(Config.Shops.RobsLiquor.Locations[k].x, Config.Shops.RobsLiquor.Locations[k].y, Config.Shops.RobsLiquor.Locations[k].z + 1.0), "Spausk ~r~[E]~s~ kad patektum i parduotuves meniu", 0.6, 4)
- end
- end
- for k, v in pairs(Config.Shops.WeaponShop.Locations) do
- if GetDistanceBetweenCoords(coords, Config.Shops.WeaponShop.Locations[k].x, Config.Shops.WeaponShop.Locations[k].y, Config.Shops.WeaponShop.Locations[k].z, true) < 15.0 then
- DrawMarker(29, Config.Shops.WeaponShop.Locations[k].x, Config.Shops.WeaponShop.Locations[k].y, Config.Shops.WeaponShop.Locations[k].z+1, 0, 0, 0, 0, 0, 0, 0.3, 0.1, 0.3, 241, 150, 255, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.WeaponShop.Locations[k].x, Config.Shops.WeaponShop.Locations[k].y, Config.Shops.WeaponShop.Locations[k].z+1.15, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.WeaponShop.Locations[k].x, Config.Shops.WeaponShop.Locations[k].y, Config.Shops.WeaponShop.Locations[k].z+0.85, 0, 0, 0, 0, 180.0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- ESX.Game.Utils.DrawText3D(vector3(Config.Shops.WeaponShop.Locations[k].x, Config.Shops.WeaponShop.Locations[k].y, Config.Shops.WeaponShop.Locations[k].z + 1.0), "Spausk ~r~[E]~s~ kad patektum i ginklu meniu", 0.6, 4)
- end
- end
- for k, v in pairs(Config.Shops.Illegal.Locations) do
- if GetDistanceBetweenCoords(coords, Config.Shops.Illegal.Locations[k].x, Config.Shops.Illegal.Locations[k].y, Config.Shops.Illegal.Locations[k].z, true) < 15.0 then
- ESX.Game.Utils.DrawText3D(vector3(Config.Shops.Illegal.Locations[k].x, Config.Shops.Illegal.Locations[k].y, Config.Shops.Illegal.Locations[k].z + 1.0), "Spausk ~r~[E]~s~ kad patektum i parduotuves meniu", 0.6, 4)
- DrawMarker(29, Config.Shops.Illegal.Locations[k].x, Config.Shops.Illegal.Locations[k].y, Config.Shops.Illegal.Locations[k].z+1, 0, 0, 0, 0, 0, 0, 0.3, 0.1, 0.3, 82, 192, 255, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.Illegal.Locations[k].x, Config.Shops.Illegal.Locations[k].y, Config.Shops.Illegal.Locations[k].z+1.15, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.Illegal.Locations[k].x, Config.Shops.Illegal.Locations[k].y, Config.Shops.Illegal.Locations[k].z+0.85, 0, 0, 0, 0, 180.0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- end
- end
- for k, v in pairs(Config.Shops.Zvejyba.Locations) do
- if GetDistanceBetweenCoords(coords, Config.Shops.Zvejyba.Locations[k].x, Config.Shops.Zvejyba.Locations[k].y, Config.Shops.Zvejyba.Locations[k].z, true) < 15.0 then
- ESX.Game.Utils.DrawText3D(vector3(Config.Shops.Zvejyba.Locations[k].x, Config.Shops.Zvejyba.Locations[k].y, Config.Shops.Zvejyba.Locations[k].z + 1.0), "Spausk ~r~[E]~s~ kad patektum i parduotuves meniu", 0.6, 4)
- DrawMarker(29, Config.Shops.Zvejyba.Locations[k].x, Config.Shops.Zvejyba.Locations[k].y, Config.Shops.Zvejyba.Locations[k].z+1, 0, 0, 0, 0, 0, 0, 0.3, 0.1, 0.3, 82, 192, 255, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.Zvejyba.Locations[k].x, Config.Shops.Zvejyba.Locations[k].y, Config.Shops.Zvejyba.Locations[k].z+1.15, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.Zvejyba.Locations[k].x, Config.Shops.Zvejyba.Locations[k].y, Config.Shops.Zvejyba.Locations[k].z+0.85, 0, 0, 0, 0, 180.0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- end
- end
- for k, v in pairs(Config.Shops.YouTool.Locations) do
- if GetDistanceBetweenCoords(coords, Config.Shops.YouTool.Locations[k].x, Config.Shops.YouTool.Locations[k].y, Config.Shops.YouTool.Locations[k].z, true) < 15.0 then
- ESX.Game.Utils.DrawText3D(vector3(Config.Shops.YouTool.Locations[k].x, Config.Shops.YouTool.Locations[k].y, Config.Shops.YouTool.Locations[k].z + 1.0), "Spausk ~r~[E]~s~ kad patektum i parduotuves meniu", 0.6, 4)
- DrawMarker(29, Config.Shops.YouTool.Locations[k].x, Config.Shops.YouTool.Locations[k].y, Config.Shops.YouTool.Locations[k].z+1, 0, 0, 0, 0, 0, 0, 0.3, 0.1, 0.3, 82, 192, 255, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.YouTool.Locations[k].x, Config.Shops.YouTool.Locations[k].y, Config.Shops.YouTool.Locations[k].z+1.15, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- DrawMarker(20, Config.Shops.YouTool.Locations[k].x, Config.Shops.YouTool.Locations[k].y, Config.Shops.YouTool.Locations[k].z+0.85, 0, 0, 0, 0, 180.0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- end
- end
- for k, v in pairs(Config.JobShops.PoliceJob.Locations) do
- --[[if GetDistanceBetweenCoords(coords,Config.JobShops.PoliceJob.Locations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z, true) < 15.0 then
- ESX.Game.Utils.DrawText3D(vector3(Config.JobShops.PoliceJob.Locations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z + 1.0), "Spauskite ~r~[E]~s~, kad atidarytumėte ginklų parduotuvę", 0.6, 4)
- DrawMarker(29, Config.JobShops.PoliceJob.Locations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z+1, 0, 0, 0, 0, 0, 0, 0.3, 0.1, 0.3, 82, 192, 255, 150, 0, 0, 0, true)
- DrawMarker(20, Config.JobShops.PoliceJob.Locations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z+1.15, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- DrawMarker(20, Config.JobShops.PoliceJob.Locations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z+0.85, 0, 0, 0, 0, 180.0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- end--]]
- if GetDistanceBetweenCoords(coords, Config.JobShops.PoliceJob.Locations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z, true) < 15.0 then
- DrawMarker(29, Config.JobShops.PoliceJob.Locations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z+1, 0, 0, 0, 0, 0, 0, 0.3, 0.1, 0.3, 241, 150, 255, 150, 0, 0, 0, true)
- DrawMarker(20, Config.JobShops.PoliceJob.Locations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z+1.15, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- DrawMarker(20, Config.JobShops.PoliceJob.Locations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z+0.85, 0, 0, 0, 0, 180.0, 0, 0.1, 0.1, 0.1, 255, 227, 48, 150, 0, 0, 0, true)
- ESX.Game.Utils.DrawText3D(vector3(Config.JobShops.PoliceJobLocations[k].x, Config.JobShops.PoliceJob.Locations[k].y, Config.JobShops.PoliceJob.Locations[k].z + 1.0), "Spauskite ~r~[E]~s~, kad atidarytumėte ginklų parduotuvę", 0.6, 4)
- end
- end
- end
- end)
- function CreateBlip(coords, text, radius, color, sprite)
- local blip = AddBlipForCoord(coords)
- SetBlipSprite(blip, sprite)
- SetBlipColour(blip, color)
- SetBlipScale(blip, 0.6)
- SetBlipAsShortRange(blip, true)
- BeginTextCommandSetBlipName("STRING")
- AddTextComponentString(text)
- EndTextCommandSetBlipName(blip)
- end
Advertisement
Add Comment
Please, Sign In to add comment