ResyncBanking
Configurations
Here you will get all configurations & open source files that are included within this script.
Config Files
Config = {}
Config.Debug = false -- Set to true to enable debug messages in the console
Config.Locale = 'automatic' -- automatic, en, de, es, fr, it, nl, pl, pt, tr, ar
Config.Framework = 'automatic' -- automatic, esx, qbcore, standalone
Config.Header = {
title = 'RESync',
subTitle = 'Banking'
}
Config.Database = {
cacheFull = true, -- Set to true to cache the full database on startup need time to load and increase memory usage
}
Config.Creator = {
commandName = 'creatorMenu',
permissions = { -- Permissions required to access the creator menu you can add group
'admin'
}
}
Config.Menu = {
x = 0, -- X position of the RageUI menu
y = 200, -- Y position of the RageUI menu
}
Config.Blip = {
bank = {
sprite = 108,
scale = 0.8,
display = 4,
color = 2,
shortRange = true,
text = 'Bank',
},
atm = {
sprite = 108,
scale = 0.3,
display = 4,
color = 2,
shortRange = true,
text = 'Bank',
}
}
Config.Banking = {
--[[
if useProps is enabled the script not use the live creator it will use the props defined in Config.Banking.props to detect atm locations for banks it will still use the positions and peds.
false -> Set to false to use the livecreator instead of props
true -> Set to true to use props instead of the livecreator
]]
useProps = false,
props = { -- Props for the prop system to detect banking locations
joaat('prop_atm_01'),
joaat('prop_atm_02'),
joaat('prop_atm_03'),
joaat('prop_fleeca_atm')
},
blips = {
distance = 1.75,
positions = { -- Coordinates for all banking locations
vector3(150.266, -1040.203, 29.374),
vector3(-1212.980, -330.841, 37.787),
vector3(-2962.582, 482.627, 15.703),
vector3(-112.202, 6469.295, 31.626),
vector3(314.187, -278.621, 54.170),
vector3(-351.534, -49.529, 49.042),
vector3(1175.064, 2706.643, 38.0940),
vector3(241.727, 220.706, 106.286),
},
peds = { -- Peds for all banking locations
{
coords = vector4(149.5513, -1042.1570, 29.3680, 341.6520),
model = joaat('U_M_M_BankMan'),
scenario = 'WORLD_HUMAN_CLIPBOARD'
},
{
coords = vector4(-1211.8585, -331.9854, 37.7809, 28.5983),
model = joaat('U_M_M_BankMan'),
scenario = 'WORLD_HUMAN_CLIPBOARD'
},
{
coords = vector4(-2961.0720, 483.1107, 15.6970, 88.1986),
model = joaat('U_M_M_BankMan'),
scenario = 'WORLD_HUMAN_CLIPBOARD'
},
{
coords = vector4(-112.2223, 6471.1128, 31.6267, 132.7517),
model = joaat('U_M_M_BankMan'),
scenario = 'WORLD_HUMAN_CLIPBOARD'
},
{
coords = vector4(313.8176, -280.5338, 54.1647, 339.1609),
model = joaat('U_M_M_BankMan'),
scenario = 'WORLD_HUMAN_CLIPBOARD'
},
{
coords = vector4(-351.3247, -51.3466, 49.0365, 339.3305),
model = joaat('U_M_M_BankMan'),
scenario = 'WORLD_HUMAN_CLIPBOARD'
},
{
coords = vector4(1174.9718, 2708.2034, 38.0879, 178.2974),
model = joaat('U_M_M_BankMan'),
scenario = 'WORLD_HUMAN_CLIPBOARD'
},
{
coords = vector4(247.0348, 225.1851, 106.2875, 158.7528),
model = joaat('U_M_M_BankMan'),
scenario = 'WORLD_HUMAN_CLIPBOARD'
}
}
},
positions = {}, -- Leave this empty the script will fill it automatically from the live creator...
iban = {
prefix = 'USA', -- Prefix for the iban or set it to false to disable
length = 16, -- Length of the iban
},
}Client Open Source Files
if Config.Framework == 'automatic' then
if GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
elseif GetResourceState('qb-core') == 'started' then
Config.Framework = 'qbcore'
else
Config.Framework = 'standalone'
end
end
-- e.g. [~p~E~w~]
local function removeColorString(str)
return str:gsub("~.-~", ""):gsub("[%[%]]", "")
end
function DrawHelpNotify(message)
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:HelpNotify(removeColorString(message))
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:HelpNotify(removeColorString(message))
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:HelpNotify(removeColorString(message))
elseif GetResourceState('hex_1_hud') == 'started' then
exports['hex_1_hud']:HelpNotify(removeColorString(message))
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:HelpNotify(removeColorString(message))
else
SetTextComponentFormat('STRING')
AddTextComponentString(message)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end
end
function Notify(title, message, notifyType, timeout)
if timeout == nil then timeout = 5000 end
if notifyType == nil then notifyType = 'info' end
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_1_hud') == 'started' then
exports['hex_1_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_hud') == 'started' then
exports['hex_hud']:Notify(title, message, notifyType, timeout)
else
print(('Notify: %s, %s, %s, %s'):format(title, message, notifyType, timeout))
end
endServer Open Source Files
if Config.Framework == 'automatic' then
if GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
elseif GetResourceState('qb-core') == 'started' then
Config.Framework = 'qbcore'
else
Config.Framework = 'standalone'
end
end