Skip to content

Commit

Permalink
🎨 Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Feb 1, 2024
1 parent 16f4d06 commit 2ce8765
Show file tree
Hide file tree
Showing 21 changed files with 366 additions and 372 deletions.
60 changes: 32 additions & 28 deletions server-data/resources/[esx_addons]/esx_billing/client/main.lua
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
local isDead = false

function ShowBillsMenu()
ESX.TriggerServerCallback('esx_billing:getBills', function(bills)
if #bills > 0 then
local elements = {
{unselectable = true, icon = "fas fa-scroll", title = _U('invoices')}
}
ESX.TriggerServerCallback("esx_billing:getBills", function(bills)
if #bills > 0 then
local elements = {
{ unselectable = true, icon = "fas fa-scroll", title = _U("invoices") },
}

for _,v in ipairs(bills) do
elements[#elements+1] = {
icon = "fas fa-scroll",
title = ('%s - <span style="color:red;">%s</span>'):format(v.label, _U('invoices_item', ESX.Math.GroupDigits(v.amount))),
billId = v.id
}
end
for _, v in ipairs(bills) do
elements[#elements + 1] = {
icon = "fas fa-scroll",
title = ('%s - <span style="color:red;">%s</span>'):format(v.label, _U("invoices_item", ESX.Math.GroupDigits(v.amount))),
billId = v.id,
}
end

ESX.OpenContext("right", elements, function(_,element)
ESX.TriggerServerCallback('esx_billing:payBill', function()
ShowBillsMenu()
end, element.billId)
end)
else
ESX.ShowNotification(_U('no_invoices'))
end
end)
ESX.OpenContext("right", elements, function(_, element)
ESX.TriggerServerCallback("esx_billing:payBill", function()
ShowBillsMenu()
end, element.billId)
end)
else
ESX.ShowNotification(_U("no_invoices"))
end
end)
end

RegisterCommand('showbills', function()
if not isDead then
ShowBillsMenu()
end
RegisterCommand("showbills", function()
if not isDead then
ShowBillsMenu()
end
end, false)

RegisterKeyMapping('showbills', _U('keymap_showbills'), 'keyboard', 'F7')
RegisterKeyMapping("showbills", _U("keymap_showbills"), "keyboard", "F7")

AddEventHandler('esx:onPlayerDeath', function() isDead = true end)
AddEventHandler('esx:onPlayerSpawn', function() isDead = false end)
AddEventHandler("esx:onPlayerDeath", function()
isDead = true
end)
AddEventHandler("esx:onPlayerSpawn", function()
isDead = false
end)
2 changes: 1 addition & 1 deletion server-data/resources/[esx_addons]/esx_billing/config.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Config = {}
Config.Locale = GetConvar('esx:locale', 'en')
Config.Locale = GetConvar("esx:locale", "en")
40 changes: 20 additions & 20 deletions server-data/resources/[esx_addons]/esx_billing/fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
fx_version 'adamant'
fx_version("adamant")

game 'gta5'
game("gta5")

description 'ESX Billing'
lua54 'yes'
version '0.0.4'
description("ESX Billing")
lua54("yes")
version("1.0.0")

shared_script '@es_extended/imports.lua'
shared_script("@es_extended/imports.lua")

server_scripts {
'@oxmysql/lib/MySQL.lua',
'@es_extended/locale.lua',
'locales/*.lua',
'config.lua',
'server/main.lua'
}
server_scripts({
"@oxmysql/lib/MySQL.lua",
"@es_extended/locale.lua",
"locales/*.lua",
"config.lua",
"server/main.lua",
})

client_scripts {
'@es_extended/locale.lua',
'locales/*.lua',
'config.lua',
'client/main.lua'
}
client_scripts({
"@es_extended/locale.lua",
"locales/*.lua",
"config.lua",
"client/main.lua",
})

dependency 'es_extended'
dependency("es_extended")
20 changes: 10 additions & 10 deletions server-data/resources/[esx_addons]/esx_billing/locales/br.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Locales['br'] = {
['invoices'] = 'faturas',
['invoices_item'] = '$%s',
['received_invoice'] = 'você ~r~recebeu~s~ uma fatura',
['paid_invoice'] = 'você ~g~pagou~s~ uma fatura de ~r~$%s~s~',
['received_payment'] = 'você ~g~recebeu~s~ um pagamento de ~r~$%s~s~',
['player_not_online'] = 'o jogador não está logado',
['no_money'] = 'you do not have enough money to pay this bill',
['target_no_money'] = 'the player ~r~does not~s~ have enough money to pay the bill!',
}
Locales["br"] = {
["invoices"] = "faturas",
["invoices_item"] = "$%s",
["received_invoice"] = "você ~r~recebeu~s~ uma fatura",
["paid_invoice"] = "você ~g~pagou~s~ uma fatura de ~r~$%s~s~",
["received_payment"] = "você ~g~recebeu~s~ um pagamento de ~r~$%s~s~",
["player_not_online"] = "o jogador não está logado",
["no_money"] = "you do not have enough money to pay this bill",
["target_no_money"] = "the player ~r~does not~s~ have enough money to pay the bill!",
}
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx_billing/locales/cs.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['cs'] = {
['invoices'] = 'faktury',
['invoices_item'] = '$%s',
['received_invoice'] = 'právě jsi ~r~obdrzel fakturu',
['paid_invoice'] = 'zaplatil jsi fakturu za ~r~$%s',
['no_invoices'] = 'momentalne nemas zadnou fatkuru k zaplaceni',
['received_payment'] = 'obdržel jsi platbu za ~r~$%s',
['player_not_online'] = 'hráč není přihlášen',
['no_money'] = 'nemáš dostatek peněz na zaplacení této faktury',
['target_no_money'] = 'hráč ~r~nemá dostatek peněz na zaplacení faktury!',
['keymap_showbills'] = 'otevrit menu faktur',
Locales["cs"] = {
["invoices"] = "faktury",
["invoices_item"] = "$%s",
["received_invoice"] = "právě jsi ~r~obdrzel fakturu",
["paid_invoice"] = "zaplatil jsi fakturu za ~r~$%s",
["no_invoices"] = "momentalne nemas zadnou fatkuru k zaplaceni",
["received_payment"] = "obdržel jsi platbu za ~r~$%s",
["player_not_online"] = "hráč není přihlášen",
["no_money"] = "nemáš dostatek peněz na zaplacení této faktury",
["target_no_money"] = "hráč ~r~nemá dostatek peněz na zaplacení faktury!",
["keymap_showbills"] = "otevrit menu faktur",
}
24 changes: 12 additions & 12 deletions server-data/resources/[esx_addons]/esx_billing/locales/da.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['da'] = {
['invoices'] = 'regninger',
['invoices_item'] = 'DKK%s',
['received_invoice'] = 'du har lige ~r~modtaget en faktura',
['paid_invoice'] = 'du har betalt en faktura på ~r~DKK%s',
['no_invoices'] = 'du har ingen regninger at betale i øjeblikket',
['received_payment'] = 'du har modtaget en betaling på ~r~DKK%s',
['player_not_online'] = 'spilleren er ikke online',
['no_money'] = 'du har ikke penge nok til at betale denne regning',
['target_no_money'] = 'spilleren ~r~har ikke penge nok til at betale regningen!',
['keymap_showbills'] = 'åbne regninger menu',
}
Locales["da"] = {
["invoices"] = "regninger",
["invoices_item"] = "DKK%s",
["received_invoice"] = "du har lige ~r~modtaget en faktura",
["paid_invoice"] = "du har betalt en faktura på ~r~DKK%s",
["no_invoices"] = "du har ingen regninger at betale i øjeblikket",
["received_payment"] = "du har modtaget en betaling på ~r~DKK%s",
["player_not_online"] = "spilleren er ikke online",
["no_money"] = "du har ikke penge nok til at betale denne regning",
["target_no_money"] = "spilleren ~r~har ikke penge nok til at betale regningen!",
["keymap_showbills"] = "åbne regninger menu",
}
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx_billing/locales/de.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['de'] = {
['invoices'] = 'Rechnungen',
['invoices_item'] = '%s€',
['received_invoice'] = 'Du hast eine ~r~Rechnung~r~ erhalten!',
['paid_invoice'] = 'Du bezahlst eine Rechung in der Höhe von ~r~%s€',
['no_invoices'] = 'Du hast derzeit keine Rechnung!',
['received_payment'] = 'Du bekommst eine bezahlung von ~r~%s€',
['player_not_online'] = 'Dieser Spieler ist nicht Online!',
['no_money'] = 'Du hast nicht genügend Geld um diese Rechung zu zahlen',
['target_no_money'] = 'Diese Person ~r~hat nicht genug Geld um die Rechnung zu zahlen!',
['keymap_showbills'] = 'Rechnungen Menü Öffnen',
Locales["de"] = {
["invoices"] = "Rechnungen",
["invoices_item"] = "%s€",
["received_invoice"] = "Du hast eine ~r~Rechnung~r~ erhalten!",
["paid_invoice"] = "Du bezahlst eine Rechung in der Höhe von ~r~%s€",
["no_invoices"] = "Du hast derzeit keine Rechnung!",
["received_payment"] = "Du bekommst eine bezahlung von ~r~%s€",
["player_not_online"] = "Dieser Spieler ist nicht Online!",
["no_money"] = "Du hast nicht genügend Geld um diese Rechung zu zahlen",
["target_no_money"] = "Diese Person ~r~hat nicht genug Geld um die Rechnung zu zahlen!",
["keymap_showbills"] = "Rechnungen Menü Öffnen",
}
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx_billing/locales/el.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['el'] = {
['invoices'] = 'Αποδείξεις',
['invoices_item'] = '$%s',
['received_invoice'] = 'Μόλις λάβατε μια απόδειξη',
['paid_invoice'] = 'Πληρώσατε μια απόδειξη αξίας ~r~$%s',
['no_invoices'] = 'Δεν έχετε καμία απόδειξη να πληρώσετε αυτήν τη στιγμή',
['received_payment'] = 'Λάβατε μια πληρωμή αξίας ~r~$%s',
['player_not_online'] = 'Ο παίκτης δεν είναι συνδεδεμένος',
['no_money'] = 'Δεν έχετε αρκετά χρήματα για να πληρώσετε αυτή την απόδειξη',
['target_no_money'] = 'Ο παίκτης ~r~δεν έχει αρκετά χρήματα για να πληρώσει την απόδειξη!',
['keymap_showbills'] = 'Ανοίξτε το μενού αποδείξεων',
Locales["el"] = {
["invoices"] = "Αποδείξεις",
["invoices_item"] = "$%s",
["received_invoice"] = "Μόλις λάβατε μια απόδειξη",
["paid_invoice"] = "Πληρώσατε μια απόδειξη αξίας ~r~$%s",
["no_invoices"] = "Δεν έχετε καμία απόδειξη να πληρώσετε αυτήν τη στιγμή",
["received_payment"] = "Λάβατε μια πληρωμή αξίας ~r~$%s",
["player_not_online"] = "Ο παίκτης δεν είναι συνδεδεμένος",
["no_money"] = "Δεν έχετε αρκετά χρήματα για να πληρώσετε αυτή την απόδειξη",
["target_no_money"] = "Ο παίκτης ~r~δεν έχει αρκετά χρήματα για να πληρώσει την απόδειξη!",
["keymap_showbills"] = "Ανοίξτε το μενού αποδείξεων",
}
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx_billing/locales/en.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['en'] = {
['invoices'] = 'invoices',
['invoices_item'] = '$%s',
['received_invoice'] = 'you have just ~r~received an invoice',
['paid_invoice'] = 'you paid an invoice of ~r~$%s',
['no_invoices'] = 'you do not have any bills to pay at this moment',
['received_payment'] = 'you received a payment of ~r~$%s',
['player_not_online'] = 'the player is not logged in',
['no_money'] = 'you do not have enough money to pay this bill',
['target_no_money'] = 'the player ~r~does not have enough money to pay the bill!',
['keymap_showbills'] = 'open bills menu',
Locales["en"] = {
["invoices"] = "invoices",
["invoices_item"] = "$%s",
["received_invoice"] = "you have just ~r~received an invoice",
["paid_invoice"] = "you paid an invoice of ~r~$%s",
["no_invoices"] = "you do not have any bills to pay at this moment",
["received_payment"] = "you received a payment of ~r~$%s",
["player_not_online"] = "the player is not logged in",
["no_money"] = "you do not have enough money to pay this bill",
["target_no_money"] = "the player ~r~does not have enough money to pay the bill!",
["keymap_showbills"] = "open bills menu",
}
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx_billing/locales/es.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['es'] = {
['invoices'] = 'Facturas',
['invoices_item'] = '%s$',
['received_invoice'] = 'Has ~r~recibido una multa',
['paid_invoice'] = 'Has pagado una multa de ~r~%s$',
['no_invoices'] = 'No dispones de factuas para pagar ahora mismo',
['received_payment'] = 'Has recibido un pago de %s$',
['player_not_online'] = 'El jugador no está en linea',
['no_money'] = 'No tienes suficiente dinero para pagar la factura',
['target_no_money'] = '¡El jugador ~r~no tiene suficiente dinero para pagar la factura!',
['keymap_showbills'] = 'Abrir menú de facturas',
Locales["es"] = {
["invoices"] = "Facturas",
["invoices_item"] = "%s$",
["received_invoice"] = "Has ~r~recibido una multa",
["paid_invoice"] = "Has pagado una multa de ~r~%s$",
["no_invoices"] = "No dispones de factuas para pagar ahora mismo",
["received_payment"] = "Has recibido un pago de %s$",
["player_not_online"] = "El jugador no está en linea",
["no_money"] = "No tienes suficiente dinero para pagar la factura",
["target_no_money"] = "¡El jugador ~r~no tiene suficiente dinero para pagar la factura!",
["keymap_showbills"] = "Abrir menú de facturas",
}
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx_billing/locales/fi.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['fi'] = {
['invoices'] = 'laskut',
['invoices_item'] = '$%s',
['received_invoice'] = 'sinä ~r~sait laskun',
['paid_invoice'] = 'sinä maksoit laskun suuruudelta ~r~$%s',
['no_invoices'] = 'you do not have any bills to pay at this moment',
['received_payment'] = 'sinä sait maksun suuruudelta ~r~$%s',
['player_not_online'] = 'pelaaja ei ole sisäänkirjautuneena',
['no_money'] = 'sinulla ei ole tarpeeksi rahaa maksaaksesi tätä laskua.',
['target_no_money'] = 'pelaajalla ~r~ei ole tarpeeksi rahaa maksaakseentätä laskua',
['keymap_showbills'] = 'open bills menu',
Locales["fi"] = {
["invoices"] = "laskut",
["invoices_item"] = "$%s",
["received_invoice"] = "sinä ~r~sait laskun",
["paid_invoice"] = "sinä maksoit laskun suuruudelta ~r~$%s",
["no_invoices"] = "you do not have any bills to pay at this moment",
["received_payment"] = "sinä sait maksun suuruudelta ~r~$%s",
["player_not_online"] = "pelaaja ei ole sisäänkirjautuneena",
["no_money"] = "sinulla ei ole tarpeeksi rahaa maksaaksesi tätä laskua.",
["target_no_money"] = "pelaajalla ~r~ei ole tarpeeksi rahaa maksaakseentätä laskua",
["keymap_showbills"] = "open bills menu",
}
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx_billing/locales/fr.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['fr'] = {
['invoices'] = 'factures',
['invoices_item'] = '$%s',
['received_invoice'] = 'vous avez ~r~reçu une facture',
['paid_invoice'] = 'vous avez payé une facture de ~r~$%s',
['no_invoices'] = 'vous n\'avez aucune facture à payer en ce moment',
['received_payment'] = 'vous avez reçu un paiement de $%s',
['player_not_online'] = 'le joueur n\'est pas connecté',
['no_money'] = 'vous n\'avez pas assez d\'argent pour payer cette facture',
['target_no_money'] = 'le joueur ~r~n\'a pas assez d\'argent pour payer la facture!',
['keymap_showbills'] = 'ouvrir le menu des factures',
Locales["fr"] = {
["invoices"] = "factures",
["invoices_item"] = "$%s",
["received_invoice"] = "vous avez ~r~reçu une facture",
["paid_invoice"] = "vous avez payé une facture de ~r~$%s",
["no_invoices"] = "vous n'avez aucune facture à payer en ce moment",
["received_payment"] = "vous avez reçu un paiement de $%s",
["player_not_online"] = "le joueur n'est pas connecté",
["no_money"] = "vous n'avez pas assez d'argent pour payer cette facture",
["target_no_money"] = "le joueur ~r~n'a pas assez d'argent pour payer la facture!",
["keymap_showbills"] = "ouvrir le menu des factures",
}
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx_billing/locales/hu.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['hu'] = {
['invoices'] = 'Számlák',
['invoices_item'] = '$%s',
['received_invoice'] = 'Kaptál egy számlát',
['paid_invoice'] = 'Befizettél egy számlát ( ~r~$%s )',
['no_invoices'] = 'Nincsen számlád amit kifizethetnél',
['received_payment'] = 'Fizetést kaptál: ~r~$%s',
['player_not_online'] = 'A játékos nem elérhető',
['no_money'] = 'Nincsen elég pénzed, hogy kifizesd ezt a számlát',
['target_no_money'] = 'A játékosnak nincsen annyi pénze, hogy befizesse a számlát',
['keymap_showbills'] = 'Számlák megnézése',
Locales["hu"] = {
["invoices"] = "Számlák",
["invoices_item"] = "$%s",
["received_invoice"] = "Kaptál egy számlát",
["paid_invoice"] = "Befizettél egy számlát ( ~r~$%s )",
["no_invoices"] = "Nincsen számlád amit kifizethetnél",
["received_payment"] = "Fizetést kaptál: ~r~$%s",
["player_not_online"] = "A játékos nem elérhető",
["no_money"] = "Nincsen elég pénzed, hogy kifizesd ezt a számlát",
["target_no_money"] = "A játékosnak nincsen annyi pénze, hogy befizesse a számlát",
["keymap_showbills"] = "Számlák megnézése",
}
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx_billing/locales/it.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Locales['it'] = {
['invoices'] = 'fatture',
['invoices_item'] = '$%s',
['received_invoice'] = 'hai appena ~r~ricevuto~s~ una fattura',
['paid_invoice'] = 'hai ~g~pagato~s~ una fattura di ~r~$%s~s~',
['no_invoices'] = 'non hai nessuna fattura da pagare',
['received_payment'] = 'hai ~g~ricevuto~s~ il pagamento di ~r~$%s~s~',
['player_not_online'] = 'il giocatore non ha effettuato l\'accesso',
['no_money'] = 'non hai abbastanza soldi per pagare questa fattura',
['target_no_money'] = 'il giocatore ~r~non ha~s~ abbastanza soldi per pagare la fattura!',
['keymap_showbills'] = 'apri il menu delle fatture',
Locales["it"] = {
["invoices"] = "fatture",
["invoices_item"] = "$%s",
["received_invoice"] = "hai appena ~r~ricevuto~s~ una fattura",
["paid_invoice"] = "hai ~g~pagato~s~ una fattura di ~r~$%s~s~",
["no_invoices"] = "non hai nessuna fattura da pagare",
["received_payment"] = "hai ~g~ricevuto~s~ il pagamento di ~r~$%s~s~",
["player_not_online"] = "il giocatore non ha effettuato l'accesso",
["no_money"] = "non hai abbastanza soldi per pagare questa fattura",
["target_no_money"] = "il giocatore ~r~non ha~s~ abbastanza soldi per pagare la fattura!",
["keymap_showbills"] = "apri il menu delle fatture",
}
Loading

0 comments on commit 2ce8765

Please sign in to comment.