⚙️Configuration
Banking Script Configuration Guide
This guide covers the configuration options for the NeedForScripts Banking Script, including ATM models, bank locations, and general settings. It also provides information on available functions and events for integration with other scripts.
Configuration Files
1. atms.lua
This file contains the ATM models to check when using the card item.
Add or remove model hashes as needed for your server.
2. banks.lua
This file defines bank locations and blip settings.
Modify the positions
table to add or remove bank locations. Adjust the blip
settings or remove the line to hide bank blips on the map.
3. config.lua
This file contains general settings for the Banking Script.
Adjust these settings to customize the script's behavior:
reissueFee
: Cost to reissue a bank cardatmDistance
: Interaction distance for ATMssavingInterest
: Interest rate for savings accountsitemName
: Name of the bank card item in your inventory systemmanagementJob
: Job required to access management featuresprogressBar
: Function to display a progress bar (customize as needed)
Server Exports
registerTransaction
🔹Parameters:
iban
: string - Account IBANamount
: numbernote
: stringtype
: string - 'deposit' | 'withdraw' | 'receive' | 'send'name
: string
addBalance
🔹Parameters:
iban
: string - Account IBANamount
: numberdata
: tabletransaction
: boolean - Whether to register transactionnote
: string - Transaction note (requirestransaction
to be true)removeCash
: boolean - If true, removes cash from player
removeBalance
🔹Parameters:
iban
: string - Account IBANamount
: numberdata
: tabletransaction
: boolean - Whether to register transactionnote
: string - Transaction note (requirestransaction
to be true)addCash
: boolean - If true, adds cash to player
Get Card Iban
Get Card Balance By IBAN
Get Card by IBAN
🔹Parameters:
main
(boolean)balance
(number)freeze
(boolean)iban
(string)day_stats
({income: number, expense: number}
)quick_transfer_users
({iban: string, user_name: string}[]
)overview
({day: string, amount: number}[]
)pin
(number)owner
(string)
Set Card New PIN
Client Exports
openBank
Opens the banking interface.
Events
Client Events
Card Action Event
Parameters:
data: {
amount:
number
,iban:
string
,type:
string
,note:
string
,to_iban:
string
}
Triggered when a player makes a deposit/withdraw/transfer. data
includes transaction details.
Hide Bank Event
Triggered when the player hides the bank interface.
Bank Opened Event
Triggered when the player opens the banking interface.
Server Events
Bank Opened Event
Triggered on the server when a player opens the banking interface.
Bank Card Metadata
iban
string
: unique IBAN for the cardfirstName
string
: player first namelastName
string
: player last name
State Bag
You can check if the bank interface is open using the following state:
This state can be used to prevent other actions while the banking interface is open.
Hooks
registerBankingHook
registerBankingHook
This function allows developers to add custom logic to banking events.
Parameters:
hookType
(string): The type of hook (deposit
,withdraw
,transfer
).func
(function): Custom function to validate or modify the transaction.
Payload:
iban
(string): IBAN of the account.amount
(number): Transaction amount.note
(string): Transaction note.to_iban
(string): Recipient's IBAN (for transfers).owner
(string): Owner's identifier.
Please do read the commented message regarding the 'return' .
Integration Tips
Use the provided functions and events to integrate banking features into other scripts.
Customize the progress bar function in
config.lua
to match your server's UI style.Adjust the
managementJob
inconfig.lua
to fit your server's job system.Modify ATM models and bank locations to match your server's map and assets.
Remember to restart your server after making changes to these configuration files.
Last updated