βοΈ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.
return {
2930269768,
3168729781,
506770882,
3424098598
}Add or remove model hashes as needed for your server.
2. banks.lua
This file defines bank locations and blip settings.
return {
blip = {sprite = 207, color = 1}, -- remove this if you want to hide blips
positions = {
vec3(150.266, -1040.203, 29.374),
vec3(-1212.980, -330.841, 37.787),
vec3(-2962.582, 482.627, 15.703),
vec3(-112.202, 6469.295, 31.626),
vec3(314.187, -278.621, 54.170),
vec3(-351.534, -49.529, 49.042),
vec3(241.727, 220.706, 106.286),
vec3(1175.0643310547, 2706.6435546875, 38.094036102295)
}
}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 (requirestransactionto be true)removeCash: boolean - If true, removes cash from playertype:string - 'deposit' | 'withdraw' | 'receive' | 'send
removeBalance
πΉParameters:
iban: string - Account IBANamount: numberdata: tabletransaction: boolean - Whether to register transactionnote: string - Transaction note (requirestransactionto 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
Get Player Cards
Freeze or Unfreeze Card
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
registerBankingHookThis 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.
Integration Tips
Use the provided functions and events to integrate banking features into other scripts.
Customize the progress bar function in
config.luato match your server's UI style.Adjust the
managementJobinconfig.luato 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
