Skip to content

Commit

Permalink
Merge pull request #17 from bitpredator/develop
Browse files Browse the repository at this point in the history
fix(ESX.UI): Close Opened Menus on Resource Stop
  • Loading branch information
bitpredator authored Nov 7, 2023
2 parents 09de8dc + 98d5c51 commit f71c95a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 33 deletions.
11 changes: 11 additions & 0 deletions client/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,17 @@ AddEventHandler('esx:showHelpNotification', function(msg, thisFrame, beep, durat
ESX.ShowHelpNotification(msg, thisFrame, beep, duration)
end)

AddEventHandler('onResourceStop', function(resourceName)
for i = 1, #ESX.UI.Menu.Opened, 1 do
if ESX.UI.Menu.Opened[i] then
if ESX.UI.Menu.Opened[i].namespace == resourceName then
ESX.UI.Menu.Opened[i].close()
ESX.UI.Menu.Opened[i] = nil
end
end
end
end)

-- SetTimeout
CreateThread(function()
while true do
Expand Down
66 changes: 33 additions & 33 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,48 @@ Config.Accounts = {
money = {
label = _U('account_money'),
round = true
}
},
}

Config.StartingAccountMoney = {bank = 50000}
Config.EnableSocietyPayouts = true -- pay from the society account that the player is employed at? Requirement: esx_society
Config.MaxWeight = 24 -- the max inventory weight without backpack
Config.PaycheckInterval = 7 * 60000 -- how often to recieve pay checks in milliseconds
Config.EnableDebug = false -- Use Debug options?
Config.EnableDefaultInventory = false -- Display the default Inventory ( F2 )
Config.EnableWantedLevel = false -- Use Normal GTA wanted Level?
Config.EnablePVP = true -- Allow Player to player combat
Config.StartingAccountMoney = {bank = 50000}
Config.EnableSocietyPayouts = true -- pay from the society account that the player is employed at? Requirement: esx_society
Config.MaxWeight = 24 -- the max inventory weight without backpack
Config.PaycheckInterval = 7 * 60000 -- how often to recieve pay checks in milliseconds
Config.EnableDebug = false -- Use Debug options?
Config.EnableWantedLevel = false -- Use Normal GTA wanted Level?
Config.EnablePVP = true -- Allow Player to player combat
Config.Multichar = true -- Enable support for esx_multicharacter
Config.Identity = true -- Select a characters identity data before they have loaded in (this happens by default with multichar)
Config.DistanceGive = 4.0 -- Max distance when giving items, weapons etc.
Config.DisableHealthRegeneration = false -- Player will no longer regenerate health
Config.DisableVehicleRewards = false -- Disables Player Recieving weapons from vehicles
Config.DisableNPCDrops = false -- stops NPCs from dropping weapons on death
Config.DisableNPCDrops = true -- stops NPCs from dropping weapons on death
Config.DisableWeaponWheel = false -- Disables default weapon wheel
Config.DisableAimAssist = false -- disables AIM assist (mainly on controllers)
Config.RemoveHudCommonents = {
[1] = false, --WANTED_STARS,
[2] = false, --WEAPON_ICON
[3] = false, --CASH
[4] = false, --MP_CASH
[5] = false, --MP_MESSAGE
[6] = false, --VEHICLE_NAME
[7] = false,-- AREA_NAME
[8] = false,-- VEHICLE_CLASS
[9] = false, --STREET_NAME
[10] = false, --HELP_TEXT
[11] = false, --FLOATING_HELP_TEXT_1
[12] = false, --FLOATING_HELP_TEXT_2
[13] = false, --CASH_CHANGE
[14] = false, --RETICLE
[15] = false, --SUBTITLE_TEXT
[16] = false, --RADIO_STATIONS
[17] = false, --SAVING_GAME,
[18] = false, --GAME_STREAM
[19] = false, --WEAPON_WHEEL
[20] = false, --WEAPON_WHEEL_STATS
[21] = false, --HUD_COMPONENTS
[22] = false, --HUD_WEAPONS
Config.DisableDisplayAmmo = false -- Disable ammunition display
Config.RemoveHudComponents = {
[1] = false, -- WANTED_STARS,
[2] = false, -- WEAPON_ICON
[3] = false, -- CASH
[4] = false, -- MP_CASH
[5] = false, -- MP_MESSAGE
[6] = false, -- VEHICLE_NAME
[7] = false, -- AREA_NAME
[8] = false, -- VEHICLE_CLASS
[9] = false, -- STREET_NAME
[10] = false, -- HELP_TEXT
[11] = false, -- FLOATING_HELP_TEXT_1
[12] = false, -- FLOATING_HELP_TEXT_2
[13] = false, -- CASH_CHANGE
[14] = false, -- RETICLE
[15] = false, -- SUBTITLE_TEXT
[16] = false, -- RADIO_STATIONS
[17] = false, -- SAVING_GAME,
[18] = false, -- GAME_STREAM
[19] = false, -- WEAPON_WHEEL
[20] = false, -- WEAPON_WHEEL_STATS
[21] = false, -- HUD_COMPONENTS
[22] = false, -- HUD_WEAPONS
}

Config.MaxAdminVehicles = true -- admin vehicles spawn with max vehcle settings
Expand Down

0 comments on commit f71c95a

Please sign in to comment.