fix blip issue

and fix spam escape when try open bank ui
This commit is contained in:
Horváth Gellért
2022-09-11 12:38:11 +02:00
parent 1e9eadbd95
commit 472e18e010
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -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)
+7 -3
View File
@@ -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({}));
}
}
});
})