This commit is contained in:
Benzo
2022-09-15 21:27:08 +02:00
14 changed files with 189 additions and 132 deletions
+17 -4
View File
@@ -492,13 +492,26 @@ function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked)
local isAutomobile = IsThisModelACar(model)
if isAutomobile ~= false then isAutomobile = true end
ESX.TriggerServerCallback('esx:Onesync:SpawnVehicle',function(NetID)
print("Spawned Vehicle: " .. NetID)
if NetID then
local Tries = 0
SetNetworkIdCanMigrate(NetID, true)
local vehicle = NetworkGetEntityFromNetworkId(NetID)
while not DoesEntityExist(vehicle) and not NetworkHasControlOfEntity(vehicle) do
vehicle = NetworkGetEntityFromNetworkId(NetID)
NetworkRequestControlOfEntity(vehicle)
while not DoesEntityExist(vehicle) do
Wait(0)
vehicle = NetworkGetEntityFromNetworkId(NetID)
Tries += 1
if Tries > 250 then
break
end
end
Tries = 0
NetworkRequestControlOfEntity(vehicle)
while not NetworkHasControlOfEntity(vehicle) do
Wait(0)
Tries += 1
if Tries > 250 then
break
end
end
SetEntityAsMissionEntity(vehicle, true, true)
SetVehicleHasBeenOwnedByPlayer(vehicle, true)
+12 -2
View File
@@ -298,8 +298,18 @@ function loadESXPlayer(identifier, playerId, isNew)
TriggerEvent('esx:playerLoaded', playerId, xPlayer, isNew)
xPlayer.triggerEvent('esx:playerLoaded',
{accounts = xPlayer.getAccounts(), coords = xPlayer.getCoords(), identifier = xPlayer.getIdentifier(), inventory = xPlayer.getInventory(),
job = xPlayer.getJob(), loadout = xPlayer.getLoadout(), maxWeight = xPlayer.getMaxWeight(), money = xPlayer.getMoney(), dead = false}, isNew,
{
accounts = xPlayer.getAccounts(),
coords = xPlayer.getCoords(),
identifier = xPlayer.getIdentifier(),
inventory = xPlayer.getInventory(),
job = xPlayer.getJob(),
loadout = xPlayer.getLoadout(),
maxWeight = xPlayer.getMaxWeight(),
money = xPlayer.getMoney(),
sex = xPlayer.get("sex") or "m",
dead = false
}, isNew,
userData.skin)
if not Config.OxInventory then
+4 -8
View File
@@ -272,8 +272,9 @@ if ESX.GetConfig().Multichar then
local spawn = playerData.coords or Config.Spawn
if isNew or not skin or #skin == 1 then
local finished = false
local sex = skin.sex or 0
local model = sex == 0 and mp_m_freemode_01 or mp_f_freemode_01
skin = Config.Default[playerData.sex]
skin.sex = playerData.sex == "m" and 0 or 1
local model = skin.sex == 0 and mp_m_freemode_01 or mp_f_freemode_01
RequestModel(model)
while not HasModelLoaded(model) do
RequestModel(model)
@@ -281,13 +282,8 @@ if ESX.GetConfig().Multichar then
end
SetPlayerModel(PlayerId(), model)
SetModelAsNoLongerNeeded(model)
while not ESX.PlayerData.sex do
Wait(0)
end
skin = Config.Default[ESX.PlayerData.sex]
skin.sex = ESX.PlayerData.sex == "m" and 0 or 1
TriggerEvent('skinchanger:loadSkin', skin, function()
playerPed = PlayerPedId()
local playerPed = PlayerPedId()
SetPedAoBlobRendering(playerPed, true)
ResetEntityAlpha(playerPed)
TriggerEvent('esx_skin:openSaveableMenu', function()
+1 -5
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)
@@ -126,14 +126,10 @@ function OpenUi(atm)
openATM = atm,
datas = {
your_money_panel = {
title = _U('your_money_title'),
desc = _U('your_money_desc'),
accountsData = {{
title = _U('your_money_cash'),
name = "cash",
amount = data.money
}, {
title = _U('your_money_bank'),
name = "bank",
amount = data.bankMoney
}}
+105
View File
@@ -71,6 +71,10 @@
}
],
"LAUNGAGE": {
"your_money_title":"Balance",
"your_money_desc":"Here you can see your current balance and cash.",
"your_money_cash_label":"Your cash",
"your_money_bank_label":"Your bank balance",
"withdraw":"WITHDRAW",
"deposit":"DEPOSIT",
"transfer":"TRANSFER",
@@ -165,6 +169,10 @@
],
"LAUNGAGE": {
"your_money_title":"Egyenleged",
"your_money_desc":"Itt láthatod a jelenlegi egyenleged és készpénzed.",
"your_money_cash_label":"Készpénz",
"your_money_bank_label":"Banki egyenleged",
"withdraw":"KIVÉTEL",
"deposit":"BETÉTEL",
"transfer":"UTALÁS",
@@ -187,5 +195,102 @@
"tableFullLanguage":"Hungarian"
}
}
},
"IT":{
"DYNAMIC_FORM_DATA":[
{
"componentName":"moreGraph",
"elementID":"#wrapper",
"title":"",
"closeButtonText":"Close",
"bankTitle":"Fleeca Bank",
"mainExitButtonText": "Disconnettersi"
},
{
"elementID":"#cpincode",
"name":"cpincode",
"buttonText":"conferma",
"inputPlaceholder": "4 cifre...",
"title":"IMPOSTAZIONE CODICE PIN",
"description": "Qui puoi impostare o modificare il codice PIN.",
"type":"password"
},
{
"elementID":"#withdraw",
"name":"withdraw",
"buttonText":"conferma",
"inputPlaceholder": "Quantità",
"title":"RITIRARE",
"description": "Qui puoi prelevare i tuoi soldi dalla banca.",
"type":"number"
},
{
"elementID":"#deposit",
"name":"deposit",
"buttonText":"conferma",
"inputPlaceholder": "Quantità",
"title":"DEPOSITARE",
"description": "Qui puoi depositare i tuoi soldi in banca.",
"type":"number"
},
{
"elementID":"#transfer",
"name":"transfer",
"buttonText":"trasferisci",
"inputPlaceholder": "Quantità",
"inputPlaceholder2": "Giocatore ID",
"title":"TRASFERIMENTO",
"description": "Qui puoi trasferire i tuoi soldi a qualcun altro."
},
{
"componentName":"trans",
"elementID":"#third-column",
"title":"CRONOLOGIA DELLE TRANSAZIONI",
"description": "Qui puoi vedere la cronologia delle tue operazioni.",
"moreHistoryText": "Mostra più cronologia",
"moreGraphText": "Mostra tutto il grafico"
},
{
"componentName":"pincodePanel",
"elementID":"#wrapper",
"title":"Enter PIN",
"deleteButtonText": "<i class='fa-solid fa-ban'></i>",
"loginButtonText": "<i class='fa-solid fa-right-to-bracket'></i>",
"closeButtonText": "Close"
},
{
"componentName":"atmComponent",
"elementID":"#wrapper",
"title":"Fleeca Bank",
"closeButtonText":"Disconnettersi"
}
],
"LAUNGAGE": {
"your_money_title":"saldo",
"your_money_desc":"qui puoi vedere il saldo attuale e contanti.",
"your_money_cash":"i tuoi soldi",
"your_money_bank":"il tuo saldo bancario",
"withdraw":"RITIRARE",
"deposit":"DEPOSITARE",
"transfer":"TRASFERIMENTO",
"transferReceive":"TRASFERIMENTO RICEVUTO",
"moneyFormat":"$__replaceData__",
"graphTitle":"Il tuo bilancio",
"moreGraphTitle": "grafico",
"moreHistoryTitle":"Mostra la cronologia",
"inputErrorTitle":"I dati non sono corretti",
"inputErrorMessage":"Non può essere vuoto o un valore inferiore a 1!",
"showPincodeErrorTitle":"PIN errato",
"showPincodeErrorMessage":"Il pin deve contenere almeno 4 caratteri!",
"tableLang":{
"typeLabel": "Tipo di transazione",
"balanceLabel":"bilancio",
"amountLabel":"quantità",
"timeLabel":"tempo",
"searchInputPlaceholder":"Cerca ...",
"_comment": "tabella Opzioni complete della lingua: inglese, ungherese, italiana puoi trovare qui tutte le lingue: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/",
"tableFullLanguage":"Italiano"
}
}
}
}
@@ -758,3 +758,10 @@ table.dataTable tbody tr:hover {
padding: 3vmin;
border-radius: 1.38vmin;
}
/*MEDIA QUERY*/
@media only screen and (max-width: 1280px) {
.dataTables_scrollBody{
max-height: 310px !important;
}
}
@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<g>
<path d="M474.045,173.813c-4.201,1.371-6.494,5.888-5.123,10.088c7.571,23.199,11.411,47.457,11.411,72.1
c0,62.014-24.149,120.315-68,164.166s-102.153,68-164.167,68s-120.316-24.149-164.167-68S16,318.014,16,256
S40.149,135.684,84,91.833s102.153-68,164.167-68c32.889,0,64.668,6.734,94.455,20.017c28.781,12.834,54.287,31.108,75.81,54.315
c3.004,3.239,8.066,3.431,11.306,0.425c3.24-3.004,3.43-8.065,0.426-11.306c-23-24.799-50.26-44.328-81.024-58.047
C317.287,15.035,283.316,7.833,248.167,7.833c-66.288,0-128.608,25.813-175.48,72.687C25.814,127.392,0,189.712,0,256
c0,66.287,25.814,128.607,72.687,175.479c46.872,46.873,109.192,72.687,175.48,72.687s128.608-25.813,175.48-72.687
c46.873-46.872,72.687-109.192,72.687-175.479c0-26.332-4.105-52.26-12.201-77.064
C482.762,174.736,478.245,172.445,474.045,173.813z"/>
<path d="M504.969,83.262c-4.532-4.538-10.563-7.037-16.98-7.037s-12.448,2.499-16.978,7.034l-7.161,7.161
c-3.124,3.124-3.124,8.189,0,11.313c3.124,3.123,8.19,3.124,11.314-0.001l7.164-7.164c1.51-1.512,3.52-2.344,5.66-2.344
s4.15,0.832,5.664,2.348c1.514,1.514,2.348,3.524,2.348,5.663s-0.834,4.149-2.348,5.663L217.802,381.75
c-1.51,1.512-3.52,2.344-5.66,2.344s-4.15-0.832-5.664-2.348L98.747,274.015c-1.514-1.514-2.348-3.524-2.348-5.663
c0-2.138,0.834-4.149,2.351-5.667c1.51-1.512,3.52-2.344,5.66-2.344s4.15,0.832,5.664,2.348l96.411,96.411
c1.5,1.5,3.535,2.343,5.657,2.343s4.157-0.843,5.657-2.343l234.849-234.849c3.125-3.125,3.125-8.189,0-11.314
c-3.124-3.123-8.189-3.123-11.313,0L212.142,342.129l-90.75-90.751c-4.533-4.538-10.563-7.037-16.98-7.037
s-12.448,2.499-16.978,7.034c-4.536,4.536-7.034,10.565-7.034,16.977c0,6.412,2.498,12.441,7.034,16.978l107.728,107.728
c4.532,4.538,10.563,7.037,16.98,7.037c6.417,0,12.448-2.499,16.977-7.033l275.847-275.848c4.536-4.536,7.034-10.565,7.034-16.978
S509.502,87.794,504.969,83.262z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

+22 -42
View File
@@ -1,3 +1,4 @@
var LOADED = true
class Components{
static allComponents = []
static generateAllComponents(generatedData,generateType = "bank"){
@@ -55,11 +56,14 @@ 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)
@@ -264,25 +268,7 @@ class Render {
language = ""
constructor(elementID){
this.elementID = elementID
// this.fullRenderData = renderData
}
// getCurrentTemplate(){
// let functionName = ""
// switch(this.elementID){
// case "bankcard":
// functionName = this.renderBankCard()
// break;
// case "your_money":
// functionName = this.renderMyMoneySection()
// break;
// case "transaction":
// functionName = this.renderTransactions()
// break;
// }
// return functionName;
// }
renderBankCard(){
const bankData = this.fullRenderData
$("#bankcard").empty();
@@ -387,14 +373,13 @@ class Render {
renderMyMoneySection(){
const moneyData = this.fullRenderData
$("#your-money-panel").empty();
let template = `<h3>${moneyData.title}</h3>
<p>${moneyData.desc}</p>
let template = `<h3>${this.language.your_money_title}</h3>
<p>${this.language.your_money_desc}</p>
<div id="money-containers">`;
moneyData.accountsData.forEach((data)=>{
template += `
<div class="money-container">
<h4>${data.title}</h4>
<h4>${this.language[`your_money_${data.name}_label`]}</h4>
<span id="money-${data.name}">${this.language.moneyFormat.replace("__replaceData__",data.amount)}</span>
</div>
`;
@@ -496,8 +481,7 @@ class Pincode {
}
}
const timeZone = localStorage.getItem("TIME_ZONE")
var timeZone = ""
class Utils {
static dateFormat(date){
if(typeof(date) == "number"){
@@ -505,8 +489,7 @@ class Utils {
}else{
var newDate = date
}
return newDate.toLocaleString([timeZone], {
return newDate.toLocaleString([Utils.getTimeZone()], {
weekday:"long",
hour:"2-digit",
minute:"2-digit",
@@ -545,6 +528,14 @@ class Utils {
}
return genNum;
}
static setTimeZone(newTimeZone){
timeZone = newTimeZone
}
static getTimeZone(){
return timeZone
}
}
class Graph{
@@ -659,7 +650,7 @@ $(document).ready(function(){
if(data[data.lang] != null){
lang = data.lang
}
localStorage.setItem("TIME_ZONE",lang == "EN" ? "en-GB" : "hu-HU")
Utils.setTimeZone(lang == "HU" ? "hu-HU" : "en-GB")
formData = new GlobalStore(data[lang]["DYNAMIC_FORM_DATA"])
language = new GlobalStore(data[lang]["LAUNGAGE"])
}).fail(function(error){
@@ -898,7 +889,6 @@ $(document).ready(function(){
second: false
}
let currentNotify = false
$(document).on('keyup','input[type="number"] , input[type="password"]',function(){
let buttonGroup = $(this).closest('.input-groups-container').find('button');
@@ -927,12 +917,6 @@ $(document).ready(function(){
if($(this).val() != '') {
if($(this).attr("name") == "pincode" && $(this).val().length < 4){
if(!currentNotify){
currentNotify = true
setTimeout(function(){
currentNotify = false
},3000)
}
return
}
@@ -962,12 +946,6 @@ $(document).ready(function(){
let inputValue = $(this).prev('input').val();
if(inputValue == undefined){return}
if((inputValue.length == 0 && inputValue <= 0 )){
if(!currentNotify){
currentNotify = true
setTimeout(function(){
currentNotify = false
},3000)
}
return
}
@@ -997,8 +975,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({}));
}
}
});
})
+1 -3
View File
@@ -3,7 +3,6 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.12.1/datatables.min.css"/>
<link rel="stylesheet" href="./libs/simple-notify.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="css/app.css" type="text/css" />
</head>
@@ -15,7 +14,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/chart.min.js" integrity="sha512-ElRFoEQdI5Ht6kZvyzXhYG9NqjtkmlkfYk0wr6wHxU9JEHakS7UJZNeml5ALk+8IKlU6jDgMabC3vkumRokgJA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.12.1/datatables.min.js"></script>
<script src="https://kit.fontawesome.com/bc14c07181.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="./libs/simple-notify.min.js"></script>
<script src="scripts/app.js"></script>
</body>
</html>
</html>
+1 -5
View File
@@ -12,9 +12,5 @@ Locales['en'] = {
['not_enough_money'] = "Not enough money! You need %s money!",
['pincode_not_found'] = "Invalid PIN code",
['pincode_found'] = "Valid PIN code...",
['bank_name'] = "Fleeca Bank",
['your_money_title'] = "Balance",
['your_money_desc'] = "Here you can see your current balance and cash.",
['your_money_cash'] = "Your cash",
['your_money_bank'] = "Your bank balance"
['bank_name'] = "Fleeca Bank"
}
+1 -5
View File
@@ -12,9 +12,5 @@ Locales['hu'] = {
['not_enough_money'] = "Nincs elég pénzed, még szükséged lesz ennyire: %s",
['pincode_not_found'] = "Érvénytelen PIN kód",
['pincode_found'] = "Érvényes PIN kód...",
['bank_name'] = "Fleeca Bank",
['your_money_title'] = "Egyenleg",
['your_money_desc'] = "Itt láthatod a jelenlegi egyenleged és készpénzed.",
['your_money_cash'] = "Készpénz",
['your_money_bank'] = "Banki egyenleged"
['bank_name'] = "Fleeca Bank"
}
+16
View File
@@ -0,0 +1,16 @@
Locales['it'] = {
['invalid_amount'] = 'questa è una somma di denaro non valida',
['deposit_money'] = 'hai depositato $%s',
['withdraw_money'] = 'hai prelevato $%s',
['pincode_money'] = 'hai un nuovo codice pin %s',
['transfer_money'] = 'hai trasferito con successo il denaro a $%s ID: %s',
['receive_transfer'] = 'hai ricevuto un trasferimento di denaro da $%s ID: %s',
['press_e_banking'] = 'premi [E] per accedere alla banca',
['access_bank'] = 'accedi alla banca',
['banking_blip'] = 'Banca',
['cant_do_it'] = "non puoi farlo!",
['not_enough_money'] = "non hai abbastanza soldi! hai bisogno di %s soldi!",
['pincode_not_found'] = "codice PIN errato",
['pincode_found'] = "codice PIN valido...",
['bank_name'] = "Fleeca Bank",
}
+1 -1
View File
@@ -108,7 +108,7 @@ Locales['en'] = {
["wardrobe_desc"] = "Change Position of Property Wardrobe.",
["Furniture_title"] = "Furniture",
["Furniture_desc"] = "Change Position of Property Wardrobe.",
["enter_title"] = "Inventory",
["enter_title"] = "Enter",
["knock_title"] = "Knock On Door",
["buy_title"] = "Buy",
["buy_desc"] = "Buy This Property For $%s",
+1 -1
View File
@@ -7,7 +7,7 @@
<hr>
### Supporters
### Supporters
Interested in helping us? [Take a look at our patreon](https://www.patreon.com/esx "Take a look at our patreon")