tweak - esx_vehicleshop - add TextUI and add Blip Config Options

This commit is contained in:
Mycroft
2022-05-28 16:44:48 +01:00
parent 17921ee4ca
commit c289c2b46c
2 changed files with 20 additions and 11 deletions
+13 -11
View File
@@ -706,7 +706,7 @@ AddEventHandler('esx_vehicleshop:hasExitedMarker', function(zone)
if not IsInShopMenu then
ESX.UI.Menu.CloseAll()
end
ESX.HideUI()
CurrentAction = nil
end)
@@ -741,16 +741,18 @@ end
-- Create Blips
CreateThread(function()
local blip = AddBlipForCoord(Config.Zones.ShopEntering.Pos)
if Config.Blip.show then
local blip = AddBlipForCoord(Config.Zones.ShopEntering.Pos)
SetBlipSprite (blip, 326)
SetBlipDisplay(blip, 4)
SetBlipScale (blip, 1.0)
SetBlipAsShortRange(blip, true)
SetBlipSprite (blip, Config.Blip.Sprite)
SetBlipDisplay(blip, Config.Blip.Display)
SetBlipScale (blip, Config.Blip.Scale)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName('STRING')
AddTextComponentSubstringPlayerName(_U('car_dealer'))
EndTextCommandSetBlipName(blip)
BeginTextCommandSetBlipName('STRING')
AddTextComponentSubstringPlayerName(_U('car_dealer'))
EndTextCommandSetBlipName(blip)
end
end)
-- Enter / Exit marker events & Draw Markers
@@ -799,7 +801,7 @@ CreateThread(function()
Wait(0)
if CurrentAction then
ESX.ShowHelpNotification(CurrentActionMsg)
ESX.TextUI(CurrentActionMsg)
if IsControlJustReleased(0, 38) then
if CurrentAction == 'shop_menu' then
@@ -837,7 +839,7 @@ CreateThread(function()
elseif CurrentAction == 'boss_actions_menu' then
OpenBossActionsMenu()
end
ESX.HideUI()
CurrentAction = nil
end
else
+7
View File
@@ -16,6 +16,13 @@ Config.PlateUseSpace = true
Config.OxInventory = ESX.GetConfig().OxInventory
Config.Blip = {
show = true,
Sprite = 326,
Display = 4,
Scale = 0.8
}
Config.Zones = {
ShopEntering = {