Accessible files
Here you can find all the files which can be edite to make the asset compatible with your server.
config.lua
Config = {
Core = 'ESX', -- ESX / QBCORE | Other core setting on the 'core' folder and the client and server utils.lua
BankLabel = {'BRUTAL', 'BANKING'},
Target = 'textnui', -- 'textnui' / 'oxtarget' / 'qb-target'
TextUI = 'ESXTextUI', -- 'ox_lib' / 'okokTextUI' / 'ESXTextUI' / 'QBDrawText' // Custom can be add in the cl_utils.lua!!!
BrutalNotify = true, -- Buy here: (4€+VAT) https://store.brutalscripts.com | Or set up your own notify >> cl_utils.lua
SteamName = true, -- true = Steam name | false = character name
IBAN = {prefix = 'BS', numbers = 6}, -- The prefix of the IBAN and the iban number
PINChangeCost = 1000, -- Change PINCODE price
IBANChangeCost = 5000, -- Change IBAN price
NewSubAccountCost = 25000, -- New Sub account create price
DailyLimit = 9999999, -- Maximum withdraw limit that the player can set in the permission section of the sub account.
DateFormat = '%d/%m/%Y', -- Date format
Distances = {marker = 10.0, open = 2.0}, -- Distances
AtmModels = {'prop_fleeca_atm', 'prop_atm_01', 'prop_atm_02', 'prop_atm_03'}, -- Atm models
BankBlips = {color = 69, sprite = 108, size = 0.7}, -- Bank Blips
MenuOpenKey = 38, -- Menu open key, more key: https://docs.fivem.net/docs/game-references/controls
MenuReopenLimit = false, -- 10 = 10 sec | false = turn off
Banks = {
[1] = {
bankName = 'Bank', -- Bank Name
blipEnabled = true, -- Enable blip? true / false
pedEnabled = true, -- Enable Assistant NPC? true / false
assistantModel = 'ig_bankman', -- Enable Assistant model, more models: https://docs.fivem.net/docs/game-references/ped-models/
assistantCoords = vector4(149.5513, -1042.1570, 29.3680, 341.6520), -- Assistant NPC coords
markerCoords = vector3(149.91, -1040.74, 29.374) -- marker coords (if the Target = 'textnui')
},
[2] = {
bankName = 'Bank',
blipEnabled = true,
pedEnabled = true,
assistantModel = 'ig_bankman',
assistantCoords = vector4(-1211.8585, -331.9854, 37.7809, 28.5983),
markerCoords = vector3(-1212.63, -330.78, 37.59)
},
[3] = {
bankName = 'Bank',
blipEnabled = true,
pedEnabled = true,
assistantModel = 'ig_bankman',
assistantCoords = vector4(-2961.0720, 483.1107, 15.6970, 88.1986),
markerCoords = vector3(-2962.47, 482.93, 15.5)
},
[4] = {
bankName = 'Bank',
blipEnabled = true,
pedEnabled = true,
assistantModel = 'ig_bankman',
assistantCoords = vector4(-112.2223, 6471.1128, 31.6267, 132.7517),
markerCoords = vector3(-113.01, 6470.24, 31.43)
},
[5] = {
bankName = 'Bank',
blipEnabled = true,
pedEnabled = true,
assistantModel = 'ig_bankman',
assistantCoords = vector4(313.8176, -280.5338, 54.1647, 339.1609),
markerCoords = vector3(314.16, -279.09, 53.97)
},
[6] = {
bankName = 'Bank',
blipEnabled = true,
pedEnabled = true,
assistantModel = 'ig_bankman',
assistantCoords = vector4(-351.3247, -51.3466, 49.0365, 339.3305),
markerCoords = vector3(-350.99, -49.99, 48.84)
},
[7] = {
bankName = 'Bank',
blipEnabled = true,
pedEnabled = true,
assistantModel = 'ig_bankman',
assistantCoords = vector4(1174.9718, 2708.2034, 38.0879, 178.2974),
markerCoords = vector3(1175.02, 2706.87, 37.89)
},
[8] = {
bankName = 'Bank',
blipEnabled = true,
pedEnabled = true,
assistantModel = 'ig_bankman',
assistantCoords = vector4(247.0348, 225.1851, 106.2875, 158.7528),
markerCoords = vector3(246.63, 223.62, 106.0)
},
-- You can add more bank...
},
-----------------------------------------------------------
-----------------------| TRANSLATE |-----------------------
-----------------------------------------------------------
MoneyForm = '$', -- Money form
MainAccountDefaultLabel = 'Main Account', -- Default main account name (This will be the default name of the player's main account)
Texts = {
[1] = {'[E] - To open banking menu', 'Open Banking Menu', 'fa-solid fa-building-columns'},
[2] = {'[E] - To open the atm menu', 'Open ATM Menu', 'fa-solid fa-building-columns'},
},
Transactions = {
Deposit = 'Deposit',
Withdraw = 'Withdraw',
Transfer = 'Transfer',
Correction = 'Correction',
NewSubAccount = 'New Sub Account',
ChangePincode = 'Change Pincode',
ChangeIban = 'Change Iban'
},
-- Notify function EDITABLE >> cl_utils.lua
Notify = {
[1] = {"BANKING", "This IBAN is already in the database!", 6000, "error"},
[2] = {"BANKING", "You have successfully change the account's IBAN!", 6000, "success"},
[3] = {"BANKING", "You have successfully change the PINCODE!", 6000, "success"},
[4] = {"BANKING", "You have successfully change the account's NAME!", 6000, "success"},
[5] = {"BANKING", "Successfully saved!", 6000, "success"},
[6] = {"BANKING", "Not enough money in your Account.", 6000, "error"},
[7] = {"BANKING", "Invalid PlayerID!", 6000, "error"},
[8] = {"BANKING", "You have successfully added!", 6000, "success"},
[9] = {"BANKING", "You don't have enough money!", 6000, "error"},
[10] = {"BANKING", "Invalid IBAN!", 6000, "error"},
[11] = {"BANKING", "You can't transfer to yourself.", 6000, "error"},
[12] = {"BANKING", "You have transferred:", 6000, "info"},
[13] = {"BANKING", "You will exceed your daily limit. Your usable limit:", 6000, "error"},
[14] = {"BANKING", "The player has already been added!", 6000, "error"},
[15] = {"BANKING", "Please set the pincode in the bank to open the atm menu!", 6000, "error"},
[16] = {"BANKING", "Please DO NOT spam the bank opening!", 6000, "error"},
[17] = {"BANKING", "You cannot open the menu in a vehicle!", 6000, "error"},
},
Webhooks = {
Use = true, -- Use webhooks? true / false
PermissionChangeLog = true, -- You want to log the sub accounts permission edit? true / false
Locale = {
['SubAccountCreated'] = 'Sub Account Created ✅',
['SubAccountDeleted'] = 'Sub Account Removed ❌',
['PermissionTableRefreshed'] = 'Permission Table Refreshed 🔑',
['PlayerName'] = 'Player Name',
['Identifier'] = 'Identifier',
['AccountID'] = 'Account ID',
['IBAN'] = 'IBAN',
['Limit'] = 'Limit',
['Permissions'] = 'Permissions',
['Permission'] = 'Permission',
['Time'] = 'Time ⏲️'
},
-- To change a webhook color you need to set the decimal value of a color, you can use this website to do that - https://www.mathsisfun.com/hexadecimal-decimal-colors.html
Colors = {
['SubAccountCreated'] = 3145631,
['SubAccountDeleted'] = 16711680,
['PermissionTableRefreshed'] = 10155240
}
}
}
client-utils.lua
ESX = Core
QBCore = Core
-- Buy here: (4€+VAT) https://store.brutalscripts.com
function notification(title, text, time, type)
if Config.BrutalNotify then
exports['brutal_notify']:SendAlert(title, text, time, type)
else
-- Put here your own notify and set the Config.BrutalNotify to false
TriggerEvent('brutal_banking:client:DefaultNotify', text)
end
end
RegisterNetEvent('brutal_banking:client:DefaultNotify')
AddEventHandler('brutal_banking:client:DefaultNotify', function(text)
SetNotificationTextEntry("STRING")
AddTextComponentString(text)
DrawNotification(0,1)
-- Default ESX Notify:
--TriggerEvent('esx:showNotification', text)
-- Default QB Notify:
--TriggerEvent('QBCore:Notify', text, 'info', 5000)
end)
function OpenMenuUtil()
DisplayRadar(false)
Citizen.CreateThread(function()
while InMenu do
N_0xf4f2c0d4ee209e20() -- it's disable the AFK camera zoom
Citizen.Wait(15000)
end
end)
end
function CloseMenuUtil()
DisplayRadar(true)
end
function DrawText3D(x, y, z, text)
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x,y,z, 0)
DrawText(0.0, 0.0)
local factor = (string.len(text)) / 370
DrawRect(0.0, 0.0+0.0125, 0.025+ factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end
function TextUIFunction(type, text)
if type == 'open' then
if Config.TextUI:lower() == 'ox_lib' then
lib.showTextUI(text)
elseif Config.TextUI:lower() == 'okoktextui' then
exports['okokTextUI']:Open(text, 'darkblue', 'right')
elseif Config.TextUI:lower() == 'esxtextui' then
ESX.TextUI(text)
elseif Config.TextUI:lower() == 'qbdrawtext' then
exports['qb-core']:DrawText(text,'left')
end
elseif type == 'hide' then
if Config.TextUI:lower() == 'ox_lib' then
lib.hideTextUI()
elseif Config.TextUI:lower() == 'okoktextui' then
exports['okokTextUI']:Close()
elseif Config.TextUI:lower() == 'esxtextui' then
ESX.HideUI()
elseif Config.TextUI:lower() == 'qbdrawtext' then
exports['qb-core']:HideText()
end
end
end
server-utils.lua
local YourWebhook = '' -- help: https://docs.brutalscripts.com/site/others/discord-webhook
function GetWebhook()
return YourWebhook
end
-- Buy here: (4€+VAT) https://store.brutalscripts.com
function notification(source, title, text, time, type)
if Config.BrutalNotify then
TriggerClientEvent('brutal_notify:SendAlert', source, title, text, time, type)
else
TriggerClientEvent('brutal_banking:client:DefaultNotify', text)
end
end
function UpdatePlayerAccount(identifier, amount)
if Config['Core']:upper() == 'ESX' then
MySQL.Async.fetchAll('SELECT * FROM users WHERE identifier = @identifier', {
['@identifier'] = identifier
}, function(results)
if results[1] then
local playerAccount = json.decode(results[1].accounts)
local NewbankBalance = playerAccount.bank + amount
playerAccount.bank = playerAccount.bank + amount
playerAccount = json.encode(playerAccount)
MySQL.Async.execute('UPDATE users SET accounts = @accounts WHERE identifier = @target', {
['@accounts'] = playerAccount,
['@target'] = identifier
}, nil)
MySQL.Async.fetchAll('SELECT * FROM brutal_banking_accounts WHERE identifier = @identifier', {
['@identifier'] = identifier
}, function(results)
if results[1] ~= nil then
local transactions = json.decode(results[1].transactions)
table.insert(transactions, {id = #transactions+1, balance = NewbankBalance, amount = amount, type = 'add', label = 'Transfer'})
if #transactions > 10 then
for k,v in pairs(transactions) do
v.id -= 1
end
for k,v in pairs(transactions) do
if v.id == 0 then
table.remove(transactions, k)
end
end
end
MySQL.Async.execute('UPDATE brutal_banking_accounts SET transactions = @transactions WHERE identifier = @identifier', {
['@identifier'] = identifier,
["@transactions"] = json.encode(transactions)
}, nil)
end
end)
end
end)
elseif Config['Core']:upper() == 'QBCORE' then
MySQL.query('SELECT * FROM players WHERE citizenid = @citizenid', {
['@citizenid'] = identifier
}, function(results)
if results[1] then
local playerAccount = json.decode(results[1].money)
local NewbankBalance = playerAccount.bank + amount
playerAccount.bank = playerAccount.bank + amount
playerAccount = json.encode(playerAccount)
MySQL.query('UPDATE players SET money = @money WHERE citizenid = @target', {
['@money'] = playerAccount,
['@target'] = identifier
}, nil)
MySQL.Async.fetchAll('SELECT * FROM brutal_banking_accounts WHERE identifier = @identifier', {
['@identifier'] = identifier
}, function(results)
if results[1] ~= nil then
local transactions = json.decode(results[1].transactions)
table.insert(transactions, {id = #transactions+1, balance = NewbankBalance, amount = amount, type = 'add', label = 'Transfer'})
if #transactions > 10 then
for k,v in pairs(transactions) do
v.id -= 1
end
for k,v in pairs(transactions) do
if v.id == 0 then
table.remove(transactions, k)
end
end
end
MySQL.Async.execute('UPDATE brutal_banking_accounts SET transactions = @transactions WHERE identifier = @identifier', {
['@identifier'] = identifier,
["@transactions"] = json.encode(transactions)
}, nil)
end
end)
end
end)
end
end
client-core.lua
Core = nil
if Config['Core']:upper() == 'ESX' then
local _esx_ = 'new' -- 'new' / 'old'
if _esx_ then
Core = exports['es_extended']:getSharedObject()
else
while Core == nil do
TriggerEvent('esx:getSharedObject', function(obj) Core = obj end)
Citizen.Wait(0)
end
end
LoadedEvent = 'esx:playerLoaded'
TSCB = Core.TriggerServerCallback
function PlayerJobFunction()
return Core.GetPlayerData().job.name
end
function GetClosestPlayerFunction()
return Core.Game.GetClosestPlayer()
end
elseif Config['Core']:upper() == 'QBCORE' then
Core = exports['qb-core']:GetCoreObject()
LoadedEvent = 'QBCore:Client:OnPlayerLoaded'
TSCB = Core.Functions.TriggerCallback
function PlayerJobFunction()
return Core.Functions.GetPlayerData().job.name
end
function GetClosestPlayerFunction()
return Core.Functions.GetClosestPlayer()
end
end
server-core.lua
Core = nil
if Config['Core']:upper() == 'ESX' then
--------------------------------------------------------------------------
---------------------------------| ESX |----------------------------------
--------------------------------------------------------------------------
local _esx_ = 'new' -- 'new' / 'old'
if _esx_ == 'new' then
Core = exports['es_extended']:getSharedObject()
else
Core = nil
TriggerEvent('esx:getSharedObject', function(obj) Core = obj end)
while Core == nil do
Citizen.Wait(0)
end
end
RESCB = Core.RegisterServerCallback
GETPFI = Core.GetPlayerFromId
RUI = Core.RegisterUsableItem
function GetIdentifier(source)
local xPlayer = GETPFI(source)
return xPlayer.identifier
end
function GetPlayerByIdentifier(identifier)
return Core.GetPlayerFromIdentifier(identifier)
end
function GetAccountMoney(source,account)
local xPlayer = GETPFI(source)
if account == 'bank' then
return xPlayer.getAccount(account).money
elseif account == 'money' then
return xPlayer.getMoney()
end
end
function AddMoneyFunction(source, account, amount)
local xPlayer = GETPFI(source)
if account == 'bank' then
xPlayer.addAccountMoney('bank', amount)
elseif account == 'money' then
xPlayer.addMoney(amount)
end
end
function RemoveAccountMoney(source, account, amount)
local xPlayer = GETPFI(source)
if account == 'bank' then
xPlayer.removeAccountMoney('bank', amount)
elseif account == 'money' then
xPlayer.removeMoney(amount)
end
end
function GetPlayerNameFunction(source)
local name
if Config.SteamName then
name = GetPlayerName(source)
else
local xPlayer = GETPFI(source)
name = xPlayer.getName() or 'No Data'
end
return name
end
function GetPlayerSex(source)
local xPlayer = GETPFI(source)
return xPlayer.get("sex")
end
elseif Config['Core']:upper() == 'QBCORE' then
--------------------------------------------------------------------------
--------------------------------| QBCORE |--------------------------------
--------------------------------------------------------------------------
Core = exports['qb-core']:GetCoreObject()
RESCB = Core.Functions.CreateCallback
GETPFI = Core.Functions.GetPlayer
RUI = Core.Functions.CreateUseableItem
function GetIdentifier(source)
local xPlayer = GETPFI(source)
return xPlayer.PlayerData.citizenid
end
function GetPlayerByIdentifier(identifier)
return Core.Functions.GetPlayerByCitizenId(identifier)
end
function GetPlayersFunction()
return Core.Functions.GetPlayers()
end
function GetAccountMoney(source, account)
local xPlayer = GETPFI(source)
if account == 'bank' then
return xPlayer.PlayerData.money.bank
elseif account == 'money' then
return xPlayer.PlayerData.money.cash
end
end
function AddMoneyFunction(source, account, amount)
local xPlayer = GETPFI(source)
if account == 'bank' then
xPlayer.Functions.AddMoney('bank', amount)
elseif account == 'money' then
xPlayer.Functions.AddMoney('cash', amount)
end
end
function RemoveAccountMoney(source, account, amount)
local xPlayer = GETPFI(source)
if account == 'bank' then
xPlayer.Functions.RemoveMoney('bank', amount)
elseif account == 'money' then
xPlayer.Functions.RemoveMoney('cash', amount)
end
end
function GetPlayerNameFunction(source)
local name
if Config.SteamName then
name = GetPlayerName(source)
else
local xPlayer = GETPFI(source)
name = xPlayer.PlayerData.charinfo.firstname..' '..xPlayer.PlayerData.charinfo.lastname
end
return name
end
function GetPlayerSex(source)
local xPlayer = GETPFI(source)
local sex = xPlayer.PlayerData.charinfo.gender
if sex == 0 then
sex = 'm'
else
sex = 'f'
end
return sex
end
end
Last updated