mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 04:01:22 +00:00
fix blip issue
and fix spam escape when try open bank ui
This commit is contained in:
@@ -20,7 +20,7 @@ end
|
||||
local function CreateBlips()
|
||||
local tmpActiveBlips = {}
|
||||
for i = 1, #Config.Banks do
|
||||
if type(Config.Banks[i].Blip) == 'table' and Config.Banks[i].Blip.Activate then
|
||||
if type(Config.Banks[i].Blip) == 'table' and Config.Banks[i].Blip.Enabled then
|
||||
local blip = AddBlipForCoord(Config.Banks[i].Position.xy)
|
||||
SetBlipSprite(blip, Config.Banks[i].Blip.Sprite)
|
||||
SetBlipScale(blip, Config.Banks[i].Blip.Scale)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
var LOADED = true
|
||||
class Components{
|
||||
static allComponents = []
|
||||
static generateAllComponents(generatedData,generateType = "bank"){
|
||||
@@ -55,11 +56,12 @@ class Components{
|
||||
<circle class="loader-path" cx="50" cy="50" r="20"></circle>
|
||||
</svg>`);
|
||||
$(appendedDiv).fadeIn(200)
|
||||
|
||||
LOADED = true
|
||||
setTimeout(() => {
|
||||
$(`${appendedDiv}`).fadeOut(200)
|
||||
$("#wrapper").fadeIn().css("display","flex");
|
||||
if(appendedDiv == ".loader") $("#container").fadeIn().css("display","flex")
|
||||
LOADED = false
|
||||
}, 2500);
|
||||
}else if(state == "hide"){
|
||||
$(`${appendedDiv}`).fadeOut(200)
|
||||
@@ -966,8 +968,10 @@ $(document).ready(function(){
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
if(e.which == 27) {
|
||||
Components.loader(".loader","hide")
|
||||
$.post('https://esx_banking/close', JSON.stringify({}));
|
||||
if (!LOADED) {
|
||||
Components.loader(".loader","hide")
|
||||
$.post('https://esx_banking/close', JSON.stringify({}));
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user