mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
tweak - esx_vehicleshop - add TextUI and add Blip Config Options
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user