forked from Simnation/Main
ed
This commit is contained in:
parent
68611a13b4
commit
8917017b83
29 changed files with 42 additions and 5224 deletions
|
@ -1,19 +1,19 @@
|
||||||
return {
|
return {
|
||||||
registers = {
|
registers = {
|
||||||
vec3(30.5373, -1343.8677, 29.3657), -- Innocence Blvd x
|
vec3(24.9456, -1344.9544, 29.6116), -- Innocence Blvd
|
||||||
vec3(-3044.0208, 589.2476, 7.7967), -- Inseno Road x
|
vec3(-3041.3566, 584.2665, 8.0235), -- Inseno Road
|
||||||
vec3(-3245.0312, 1006.1741, 12.7779), -- Barbareno Road x
|
vec3(-3244.5734, 1000.6577, 12.9453), -- Barbareno Road
|
||||||
vec3(1734.7312, 6415.5986, 34.8072), -- Great Ocean Highwayx
|
vec3(1729.3294, 6417.1230, 35.1519), -- Great Ocean Highway
|
||||||
vec3(1698.3787, 4923.2553, 42.2410), -- Grape Seed Main Street x
|
vec3(1698.3787, 4923.2553, 42.2410), -- Grape Seed Main Street
|
||||||
vec3(1963.5425, 3745.8035, 32.2628), -- Alhambra Drive x
|
vec3(1959.3229, 3742.2895, 32.4584), -- Alhambra Drive
|
||||||
vec3(543.5272, 2667.2668, 42.0055), -- Route 68 x
|
vec3(548.9014, 2668.9414, 42.2711), -- Route 68
|
||||||
vec3(2678.0212, 3286.1680, 55.0224), -- Senora Freeway x
|
vec3(2676.2124, 3280.9694, 55.3558), -- Senora Freeway
|
||||||
vec3(2554.0408, 386.8187, 108.4908), -- Palomino Freeway x
|
vec3(2554.875, 381.3857, 108.7376), -- Palomino Freeway
|
||||||
vec3(379.0530, 328.2258, 103.4661), -- Clinton Avenue x
|
vec3(373.5953, 328.5891, 103.6810), -- Clinton Avenue
|
||||||
vec3(-1820.5584, 793.9172, 138.2765), -- North Rockford Drive x
|
vec3(-1820.5584, 793.9172, 138.2765), -- North Rockford Drive
|
||||||
vec3(-47.2251, -1757.5423, 29.5983), -- Grove Street x
|
vec3(-47.2251, -1757.5423, 29.5983), -- Grove Street
|
||||||
vec3(-706.7102, -913.5667, 19.3929), -- Ginger Street x
|
vec3(-706.7102, -913.5667, 19.3929), -- Ginger Street
|
||||||
vec3(1164.1452, -322.7899, 69.3824), -- Mirror Park Blvd x
|
vec3(1164.1452, -322.7899, 69.3824) -- Mirror Park Blvd
|
||||||
vec3(30.2160, -1343.9280, 29.3871), -- Innocence Blvd x
|
vec3(30.2160, -1343.9280, 29.3871), -- Innocence Blvd x
|
||||||
vec3(-505.5432, 283.5692, 83.2220), -- DigitalDen
|
vec3(-505.5432, 283.5692, 83.2220), -- DigitalDen
|
||||||
vec3(649.1432, 260.0526, 103.5256), -- Globe Oil Vinewood x
|
vec3(649.1432, 260.0526, 103.5256), -- Globe Oil Vinewood x
|
||||||
|
@ -23,20 +23,20 @@ return {
|
||||||
|
|
||||||
},
|
},
|
||||||
computers = {
|
computers = {
|
||||||
vec3(27.6360, -1341.0083, 29.5776), -- Innocence Blvd x
|
vec3(29.5590, -1338.3704, 29.3723), -- Innocence Blvd
|
||||||
vec3(-3046.0474, 585.5750, 7.8782), -- Inseno Road x
|
vec3(-3049.0339, 586.6518, 7.7842), -- Inseno Road
|
||||||
vec3(-3248.4819, 1003.7230, 13.7320), -- Barbareno Road x
|
vec3(-3250.736, 1005.8194, 12.7060), -- Barbareno Road
|
||||||
vec3(1733.7340, 6419.5190, 34.9738), -- Great Ocean Highway x
|
vec3(1736.3864, 6420.9741, 34.9125), -- Great Ocean Highway
|
||||||
vec3(1707.3872, 4921.6953, 42.0722), -- Grape Seed Main Street x
|
vec3(1707.3872, 4921.6953, 42.0722), -- Grape Seed Main Street
|
||||||
vec3(1959.6559, 3747.2578, 32.3050), -- Alhambra Drive x
|
vec3(1960.0263, 3750.2978, 32.2190), -- Alhambra Drive
|
||||||
vec3(546.7301, 2664.3716, 42.1372), -- Route 68 x
|
vec3(545.1868, 2661.8115, 42.0318), -- Route 68
|
||||||
vec3(2673.8845, 3285.5327, 55.1613), -- Senora Freeway x
|
vec3(2672.7070, 3288.2045, 55.1164), -- Senora Freeway
|
||||||
vec3(2550.8213, 384.3675, 108.5991), -- Palomino Freeway x
|
vec3(2548.4802, 386.2579, 108.4982), -- Palomino Freeway
|
||||||
vec3(377.3978, 331.9140, 103.5180), -- Clinton Avenue x
|
vec3(379.6751, 333.8492, 103.4417), -- Clinton Avenue
|
||||||
vec3(-1828.9333, 797.3793, 138.2624), -- North Rockford Drive x
|
vec3(-1828.9333, 797.3793, 138.2624), -- North Rockford Drive
|
||||||
vec3(-44.7806, -1748.8189, 29.4642), -- Grove Street x
|
vec3(-44.7806, -1748.8189, 29.4642), -- Grove Street
|
||||||
vec3(-710.4782, -905.2836, 19.2711), -- Ginger Street x
|
vec3(-710.4782, -905.2836, 19.2711), -- Ginger Street
|
||||||
vec3(1158.9605, -315.2624, 69.2748), -- Mirror Park Blvd x
|
vec3(1158.9605, -315.2624, 69.2748) -- Mirror Park Blvd
|
||||||
vec3(27.7069, -1340.7543, 29.4220), -- Innocence Blvd x
|
vec3(27.7069, -1340.7543, 29.4220), -- Innocence Blvd x
|
||||||
vec3(-504.8910, 284.0230, 83.6154), -- DigitalDen
|
vec3(-504.8910, 284.0230, 83.6154), -- DigitalDen
|
||||||
vec3(655.9440, 264.1430, 103.5607), -- Globe Oil Vinewood x
|
vec3(655.9440, 264.1430, 103.5607), -- Globe Oil Vinewood x
|
||||||
|
@ -48,20 +48,20 @@ return {
|
||||||
|
|
||||||
},
|
},
|
||||||
safes = {
|
safes = {
|
||||||
vec3(25.3773, -1341.0256, 29.5523), -- Innocence Blvd x
|
vec3(28.1588, -1338.7192, 28.8068), -- Innocence Blvd
|
||||||
vec3(-3045.3098, 583.7722, 8.0473), -- Inseno Road x
|
vec3(-3048.2958, 585.4102, 7.2009), -- Inseno Road
|
||||||
vec3(-3248.4492, 1001.6186, 13.8684), -- Barbareno Road x
|
vec3(-3250.5161, 1004.4418, 12.1558), -- Barbareno Road
|
||||||
vec3(1731.8955, 6420.2559, 34.1493), -- Great Ocean Highway x
|
vec3(1734.9835, 6421.3173, 34.3080), -- Great Ocean Highway
|
||||||
vec3(1708.1695, 4920.8208, 41.3514), -- Grape Seed Main Street x
|
vec3(1708.1695, 4920.8208, 41.3514), -- Grape Seed Main Street
|
||||||
vec3(1957.9515, 3746.0266, 32.3912), -- Alhambra Drive x
|
vec3(1959.0202, 3749.3291, 31.6847), -- Alhambra Drive
|
||||||
vec3(549.0023, 2665.0469, 42.0748), -- Route 68 x
|
vec3(546.5106, 2662.3266, 41.5089), -- Route 68
|
||||||
vec3(2673.1079, 3283.4316, 55.3193), -- Senora Freeway x
|
vec3(2672.3398, 3286.8269, 54.6214), -- Senora Freeway
|
||||||
vec3(2550.9812, 382.2314, 108.6990), -- Palomino Freeway x
|
vec3(2548.7395, 384.8841, 107.9211), -- Palomino Freeway
|
||||||
vec3(375.0073, 332.2168, 103.5534), -- Clinton Avenue x
|
vec3(378.2658, 333.8557, 102.9076), -- Clinton Avenue
|
||||||
vec3(-1829.5384, 798.4634, 137.5601), -- North Rockford Drive x
|
vec3(-1829.5384, 798.4634, 137.5601), -- North Rockford Drive
|
||||||
vec3(-43.8009, -1748.0804, 28.7776), -- Grove Street x
|
vec3(-43.8009, -1748.0804, 28.7776), -- Grove Street
|
||||||
vec3(-710.1920, -904.1401, 18.5740), -- Ginger Street x
|
vec3(-710.1920, -904.1401, 18.5740), -- Ginger Street
|
||||||
vec3(1159.0540, -314.1202, 68.5665), -- Mirror Park Blvd x
|
vec3(1159.0540, -314.1202, 68.5665) -- Mirror Park Blvd
|
||||||
vec3(25.6516, -1341.0596, 29.5470), -- Innocence Blvd x
|
vec3(25.6516, -1341.0596, 29.5470), -- Innocence Blvd x
|
||||||
vec3(-502.5626, 295.8259, 83.4604), -- DigitalDen
|
vec3(-502.5626, 295.8259, 83.4604), -- DigitalDen
|
||||||
vec3(653.6609, 259.0182, 103.3211), -- Globe Oil Vinewood x
|
vec3(653.6609, 259.0182, 103.3211), -- Globe Oil Vinewood x
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,121 +0,0 @@
|
||||||
--[[
|
|
||||||
BY RX Scripts <EFBFBD> rxscripts.xyz
|
|
||||||
--]]
|
|
||||||
|
|
||||||
Config = {}
|
|
||||||
|
|
||||||
Config.Locale = 'de'
|
|
||||||
|
|
||||||
Config.ReceiveMoney = {
|
|
||||||
enabled = true, -- Wenn aktiviert, geht das Geld aus bezahlten Rechnungen an den Absender/die Gesellschaft
|
|
||||||
deductTax = 0.0, -- Steuerprozentsatz, der vom Rechnungsbetrag abgezogen wird (0.05 = 5 %)
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.PlayerInvoices = {
|
|
||||||
enabled = false, -- Spieler k<>nnen anderen Spielern Rechnungen senden
|
|
||||||
maxInvoices = 5000, -- Maximal ausstehende Rechnungen pro Spieler
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.JobInvoices = {
|
|
||||||
['police'] = {
|
|
||||||
label = 'Polizei',
|
|
||||||
requiredGrade = 2,
|
|
||||||
presetInvoices = {
|
|
||||||
{ name = 'Rotes Licht <20>berfahren', amount = 250, reason = 'Rotes Licht <20>berfahren' },
|
|
||||||
{ name = 'Falsches Parken', amount = 150, reason = 'Falsches Parken' },
|
|
||||||
{ name = 'Zu schnelles Fahren', amount = 300, reason = 'Zu schnelles Fahren' },
|
|
||||||
{ name = 'Gef<EFBFBD>hrliches Fahren', amount = 500, reason = 'Gef<EFBFBD>hrliches Fahren' },
|
|
||||||
{ name = 'K<EFBFBD>rperverletzung', amount = 1000, reason = 'K<EFBFBD>rperverletzung' },
|
|
||||||
}
|
|
||||||
},
|
|
||||||
['ambulance'] = {
|
|
||||||
label = 'Rettungsdienst',
|
|
||||||
requiredGrade = 2,
|
|
||||||
presetInvoices = {
|
|
||||||
{ name = 'Medizinischer Einsatz', amount = 500, reason = 'Medizinischer Einsatz' },
|
|
||||||
{ name = 'RTW-Einsatz', amount = 300, reason = 'RTW-Einsatz' },
|
|
||||||
}
|
|
||||||
},
|
|
||||||
['taxi'] = {
|
|
||||||
label = 'Down Town Cab',
|
|
||||||
requiredGrade = 1,
|
|
||||||
presetInvoices = {
|
|
||||||
{ name = 'Taxifahrt', amount = 100, reason = 'Taxifahrt' },
|
|
||||||
{ name = 'Flughafentransfer', amount = 200, reason = 'Flughafentransfer' },
|
|
||||||
}
|
|
||||||
},
|
|
||||||
['cinema'] = {
|
|
||||||
label = 'Moonlight Cinema',
|
|
||||||
requiredGrade = 0,
|
|
||||||
presetInvoices = {
|
|
||||||
{ name = 'Kinoticket', amount = 10, reason = 'Kinoticket' },
|
|
||||||
}
|
|
||||||
},
|
|
||||||
['kayas'] = {
|
|
||||||
label = 'Kayas Restaurant',
|
|
||||||
requiredGrade = 0,
|
|
||||||
presetInvoices = {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
['ammu'] = {
|
|
||||||
label = 'Ammunation',
|
|
||||||
requiredGrade = 0,
|
|
||||||
presetInvoices = {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
['sud'] = {
|
|
||||||
label = 'Santoro Unlimited',
|
|
||||||
requiredGrade = 0,
|
|
||||||
presetInvoices = {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
['cute'] = {
|
|
||||||
label = 'Coffe Cute',
|
|
||||||
requiredGrade = 0,
|
|
||||||
presetInvoices = {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.AutoPay = {
|
|
||||||
enabled = false, -- Automatisches Bezahlen nach bestimmter Zeit
|
|
||||||
hours = 24, -- Nach wie vielen Stunden eine Rechnung automatisch bezahlt wird
|
|
||||||
feePercentagePerHour = 0.05 -- Aufschlag pro Stunde (0.05 = 5 %)
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.Commands = {
|
|
||||||
openBilling = 'billing', -- /billing <20>ffnet das Rechnungsmen<65>
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.Keybinds = {
|
|
||||||
openBilling = 'F7', -- Taste zum <20>ffnen des Rechnungsmen<65>s (false = deaktivieren)
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.UI = {
|
|
||||||
color = {
|
|
||||||
primary = {
|
|
||||||
[50] = "#FEDDE9",
|
|
||||||
[100] = "#FCBAD3",
|
|
||||||
[200] = "#FA76A6",
|
|
||||||
[300] = "#F7317A",
|
|
||||||
[400] = "#D80955",
|
|
||||||
[500] = "#95063B",
|
|
||||||
[600] = "#76052E",
|
|
||||||
[700] = "#580423",
|
|
||||||
[800] = "#3B0217",
|
|
||||||
[900] = "#1D010C",
|
|
||||||
[950] = "#0F0106"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--[[
|
|
||||||
Passe diesen Teil nur an, wenn du die Namen der Ressourcen ge<EFBFBD>ndert hast
|
|
||||||
--]]
|
|
||||||
Resources = {
|
|
||||||
FM = { name = 'fmLib', export = 'new' },
|
|
||||||
RX_BANKING = { name = 'RxBanking', export = 'all' },
|
|
||||||
}
|
|
||||||
IgnoreScriptFoundLogs = false
|
|
|
@ -1,47 +0,0 @@
|
||||||
--[[
|
|
||||||
BY RX Scripts © rxscripts.xyz
|
|
||||||
--]]
|
|
||||||
|
|
||||||
fx_version 'cerulean'
|
|
||||||
games { 'gta5' }
|
|
||||||
|
|
||||||
author 'Rejox | rxscripts.xyz'
|
|
||||||
description 'Billing'
|
|
||||||
version '1.1.0'
|
|
||||||
|
|
||||||
shared_script {
|
|
||||||
'config.lua',
|
|
||||||
'init.lua',
|
|
||||||
'locales/*.lua',
|
|
||||||
}
|
|
||||||
|
|
||||||
client_scripts {
|
|
||||||
'client/utils.lua',
|
|
||||||
'client/functions.lua',
|
|
||||||
'client/main.lua',
|
|
||||||
}
|
|
||||||
server_scripts {
|
|
||||||
'@oxmysql/lib/MySQL.lua',
|
|
||||||
'server/utils.lua',
|
|
||||||
'server/functions.lua',
|
|
||||||
'server/opensource.lua',
|
|
||||||
'server/invoice.lua',
|
|
||||||
'server/main.lua',
|
|
||||||
}
|
|
||||||
|
|
||||||
ui_page 'web/dist/index.html'
|
|
||||||
|
|
||||||
files {
|
|
||||||
'web/dist/index.html',
|
|
||||||
'web/dist/assets/*.*',
|
|
||||||
}
|
|
||||||
|
|
||||||
lua54 'yes'
|
|
||||||
|
|
||||||
escrow_ignore {
|
|
||||||
'locales/*.lua',
|
|
||||||
'server/opensource.lua',
|
|
||||||
'config.lua',
|
|
||||||
'fxmanifest.lua'
|
|
||||||
}
|
|
||||||
dependency '/assetpacks'
|
|
Binary file not shown.
|
@ -1,53 +0,0 @@
|
||||||
--[[
|
|
||||||
BY RX Scripts © rxscripts.xyz
|
|
||||||
--]]
|
|
||||||
|
|
||||||
Locales['de'] = {
|
|
||||||
['billing_panel_suggestion'] = 'Abrechnungsübersicht öffnen',
|
|
||||||
['invoice_not_allowed'] = 'Nicht berechtigt, eine Rechnung zu senden',
|
|
||||||
['player_not_found'] = 'Spieler (%s) ist nicht in der Stadt',
|
|
||||||
['invoice_limit_reached'] = 'Du hast bereits %s ausstehende Rechnungen versendet',
|
|
||||||
['invoice_received'] = 'Rechnung #%s über $%s erhalten',
|
|
||||||
['invoice_sent'] = 'Rechnung #%s über $%s gesendet',
|
|
||||||
['invoice_paid'] = 'Rechnung #%s über $%s bezahlt',
|
|
||||||
['invoice_declined'] = 'Rechnung #%s abgelehnt',
|
|
||||||
['invoice_revoked'] = 'Rechnung #%s widerrufen',
|
|
||||||
['not_enough_money'] = 'Nicht genügend Geld',
|
|
||||||
|
|
||||||
-- UI ABRECHNUNGSSEITE: EINGEHENDE RECHNUNGEN
|
|
||||||
['page_label_billing_incoming_invoices'] = 'Erhaltene persönliche Rechnungen',
|
|
||||||
['page_title_billing_incoming_invoices'] = 'Erhaltene Rechnungen',
|
|
||||||
|
|
||||||
-- UI ABRECHNUNGSSEITE: GESENDETE RECHNUNGEN
|
|
||||||
['page_label_billing_sent_invoices'] = 'Gesendete persönliche Rechnungen',
|
|
||||||
['page_title_billing_sent_invoices'] = 'Gesendete Rechnungen',
|
|
||||||
|
|
||||||
-- UI ABRECHNUNGSSEITE: FIRMENRECHNUNGEN
|
|
||||||
['page_label_billing_job_sent_invoices'] = 'Von %s gesendete Rechnungen',
|
|
||||||
['page_title_billing_job_sent_invoices'] = 'Gesendete Rechnungen',
|
|
||||||
['preset_invoice'] = 'Vordefinierte Rechnung',
|
|
||||||
['page_label_billing_job_incoming_invoices'] = 'Von %s erhaltene Rechnungen',
|
|
||||||
['page_title_billing_job_incoming_invoices'] = 'Erhaltene Rechnungen',
|
|
||||||
|
|
||||||
-- UI ALLGEMEIN
|
|
||||||
['create_invoice'] = 'Rechnung erstellen',
|
|
||||||
['amount'] = 'Betrag',
|
|
||||||
['reason'] = 'Grund',
|
|
||||||
['send_to'] = 'Rechnung an',
|
|
||||||
['send_invoice'] = 'Rechnung senden',
|
|
||||||
['money_sign'] = '$',
|
|
||||||
['cancel'] = 'Abbrechen',
|
|
||||||
['pending'] = 'Ausstehend',
|
|
||||||
['paid'] = 'Bezahlt',
|
|
||||||
['declined'] = 'Abgelehnt',
|
|
||||||
['revoked'] = 'Widerrufen',
|
|
||||||
['pay'] = 'Bezahlen',
|
|
||||||
['decline'] = 'Ablehnen',
|
|
||||||
['revoke'] = 'Widerrufen',
|
|
||||||
['danger_zone'] = 'Gefahrenbereich',
|
|
||||||
['revoke_confirm'] = 'Bist du sicher, dass du diese Rechnung widerrufen möchtest?',
|
|
||||||
['decline_confirm'] = 'Bist du sicher, dass du diese Rechnung ablehnen möchtest?',
|
|
||||||
['pay_confirm'] = 'Bist du sicher, dass du diese Rechnung bezahlen möchtest?',
|
|
||||||
['player'] = 'Spieler',
|
|
||||||
['society'] = 'Gesellschaft',
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,121 +0,0 @@
|
||||||
--[[
|
|
||||||
FREE SCRIPT
|
|
||||||
DOWNLOAD @ https://store.rxscripts.xyz/
|
|
||||||
SUPPORT @ https://discord.gg/rxscripts
|
|
||||||
BY RX Scripts © rxscripts.xyz
|
|
||||||
--]]
|
|
||||||
|
|
||||||
Config.DiscordWebhooks = {
|
|
||||||
invoiceSent = '',
|
|
||||||
invoicePaid = '',
|
|
||||||
invoiceRevoked = '',
|
|
||||||
invoiceDeclined = '',
|
|
||||||
}
|
|
||||||
|
|
||||||
--[[
|
|
||||||
We have integrated RxBanking by default, to work with societies.
|
|
||||||
If you use any other banking or society accounting system, you can modify the functions below.
|
|
||||||
We HIGHLY recommend using RxBanking together with this billing script to ensure the best experience.
|
|
||||||
|
|
||||||
We love that you are using our script, so here is a little easter egg gift for you:
|
|
||||||
15% DISCOUNT OFF: Advanced Banking - RxBanking
|
|
||||||
CODE: 'FROMBILLING15'
|
|
||||||
|
|
||||||
If you want to use RxBanking, you can find it here:
|
|
||||||
https://store.rxscripts.xyz/scripts/advanced-banking
|
|
||||||
--]]
|
|
||||||
function RemoveMoneyFromSociety(society, amount)
|
|
||||||
if RX_BANKING then
|
|
||||||
return RX_BANKING:RemoveSocietyMoney(society, amount, 'payment', 'Invoice Paid')
|
|
||||||
end
|
|
||||||
|
|
||||||
Error('RxBanking not found, unable to remove money from society')
|
|
||||||
Error('Modify RemoveMoneyFromSociety function in RxBilling/server/opensource.lua to use your own banking system')
|
|
||||||
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
|
|
||||||
function GetSocietyMoney(society)
|
|
||||||
if RX_BANKING then
|
|
||||||
local acc = RX_BANKING:GetSocietyAccount(society)
|
|
||||||
if acc then return acc.balance end
|
|
||||||
end
|
|
||||||
|
|
||||||
Error('RxBanking not found, unable to get money from society')
|
|
||||||
Error('Modify GetSocietyMoney function in RxBilling/server/opensource.lua to use your own banking system')
|
|
||||||
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
|
|
||||||
function AddMoneyToSociety(society, amount)
|
|
||||||
if RX_BANKING then
|
|
||||||
return RX_BANKING:AddSocietyMoney(society, amount, 'payment', 'Invoice Payment')
|
|
||||||
end
|
|
||||||
|
|
||||||
Error('RxBanking not found, unable to add money to society')
|
|
||||||
Error('Modify AddMoneyToSociety function in RxBilling/server/opensource.lua to use your own banking system')
|
|
||||||
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
|
|
||||||
function RemoveMoneyFromBank(identifier, amount)
|
|
||||||
if RX_BANKING then
|
|
||||||
local personalAcc = RX_BANKING:GetPlayerPersonalAccount(identifier)
|
|
||||||
if personalAcc then
|
|
||||||
return RX_BANKING:RemoveAccountMoney(personalAcc.iban, amount, 'payment', 'Invoice Paid')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local table = GetResourceState('es_extended') == 'started' and 'users' or 'players'
|
|
||||||
local accountsColumn = GetResourceState('es_extended') == 'started' and 'accounts' or 'money'
|
|
||||||
local identifierColumn = GetResourceState('es_extended') == 'started' and 'identifier' or 'citizenid'
|
|
||||||
|
|
||||||
return MySQL.update.await(
|
|
||||||
string.format(
|
|
||||||
'UPDATE %s SET %s = JSON_SET(%s, "$.bank", JSON_EXTRACT(%s, "$.bank") - @amount) WHERE %s = @identifier',
|
|
||||||
table, accountsColumn, accountsColumn, accountsColumn, identifierColumn),
|
|
||||||
{
|
|
||||||
['@amount'] = amount,
|
|
||||||
['@identifier'] = identifier,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
function AddMoneyToBank(identifier, amount)
|
|
||||||
if RX_BANKING then
|
|
||||||
local personalAcc = RX_BANKING:GetPlayerPersonalAccount(identifier)
|
|
||||||
if personalAcc then
|
|
||||||
return RX_BANKING:AddAccountMoney(personalAcc.iban, amount, 'payment', 'Invoice Payment')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local table = GetResourceState('es_extended') == 'started' and 'users' or 'players'
|
|
||||||
local accountsColumn = GetResourceState('es_extended') == 'started' and 'accounts' or 'money'
|
|
||||||
local identifierColumn = GetResourceState('es_extended') == 'started' and 'identifier' or 'citizenid'
|
|
||||||
|
|
||||||
return MySQL.update.await(
|
|
||||||
string.format(
|
|
||||||
'UPDATE %s SET %s = JSON_SET(%s, "$.bank", JSON_EXTRACT(%s, "$.bank") + @amount) WHERE %s = @identifier',
|
|
||||||
table, accountsColumn, accountsColumn, accountsColumn, identifierColumn),
|
|
||||||
{
|
|
||||||
['@amount'] = amount,
|
|
||||||
['@identifier'] = identifier,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
RegisterNetEvent('rxbilling:onInvoiceSent', function(invoice)
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterNetEvent('rxbilling:onInvoicePaid', function(payerId, invoice)
|
|
||||||
-- If playerId is nil, it means the invoice was paid automatically
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterNetEvent('rxbilling:onInvoiceDeclined', function(declinerId, invoice)
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterNetEvent('rxbilling:onInvoiceRevoked', function(revokerId, invoice)
|
|
||||||
|
|
||||||
end)
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 334 KiB |
Binary file not shown.
Binary file not shown.
13
resources/[tools]/RxBilling/web/dist/index.html
vendored
13
resources/[tools]/RxBilling/web/dist/index.html
vendored
|
@ -1,13 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>RX Scripts Web</title>
|
|
||||||
<script type="module" crossorigin src="./assets/index-2GSzJdDb.js"></script>
|
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-fEqC_xA9.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Add table
Add a link
Reference in a new issue