ND_Banking
This resource creates working banks and atm's around the map, players can use atm's to withraw money. Players can also use the banks to withdaw, deposit, and transfer money. The banks also has invoices, this reasource manages invoices and has exports for developers to use.
Preview video
createInvoice export
parameters
- amount:
number
- due:
number
- request:
boolean
- from:
table
- name:
string
- account:
string
- source:
number
- character:
number
- name:
- to:
table
- name:
string
- account:
string
- source:
number
- character:
number
- name:
exports["ND_Banking"]:createInvoice(amount, due, request, from, to)
In this example the sender is a non player sender, and the receiver is a player. The invoice has 7 days to be paid. If the request parameter is set to true
then the player has to accept the invoice. In this example it's set to false
which makes the player required to pay it withing the due date.
local from = {
name = "Government",
account = "0"
}
local player = NDCore.getPlayer(source)
local to = {
character = player.id
}
local banking = exports["ND_Banking"]
banking:createInvoice(500, 7, false, from, to)
Setup guide
Install the resource
Download and add the resource to your server ND_Banking (opens in a new tab)
Install optional dependency
Configuration
ND_Banking contains a config.lua
file, each configuration option is explained here:
valuesWithdrawATM
This is the values that will show up when using an ATM.
valuesWithdrawATM = {20, 50, 100, 200, 500, 1000}
maxWithdrawDepositBank
Maximum amount of money that can be withrawn or deposited to a bank at once by a player.
maxWithdrawDepositBank = 50000
minWithdrawDepositBank
Minimum amount of money that can be withrawn or deposited to a bank at once by a player.
minWithdrawDepositBank = 1000