2022-07-16 04:46:27 +02:00
|
|
|
NDCore = exports["ND_Core"]:GetCoreObject()
|
2022-09-23 20:19:15 +02:00
|
|
|
NDCore.Functions.VersionChecker("ND_Banks", GetCurrentResourceName(), "https://github.com/ND-Framework/ND_Framework", "https://raw.githubusercontent.com/ND-Framework/ND_Framework/main/ND_Banks/fxmanifest.lua")
|
2022-07-16 04:46:27 +02:00
|
|
|
|
2022-09-01 04:11:48 -04:00
|
|
|
RegisterNetEvent("ND_Banks:withdraw", function(amount)
|
2022-07-08 23:19:28 +02:00
|
|
|
local player = source
|
2022-07-16 00:12:02 -04:00
|
|
|
local update = NDCore.Functions.WithdrawMoney(amount, player)
|
2022-07-08 23:19:28 +02:00
|
|
|
TriggerClientEvent("ND_Banks:update", player, update)
|
|
|
|
|
end)
|
|
|
|
|
|
2022-09-01 04:11:48 -04:00
|
|
|
RegisterNetEvent("ND_Banks:deposit", function(amount)
|
2022-07-08 23:19:28 +02:00
|
|
|
local player = source
|
2022-07-16 00:12:02 -04:00
|
|
|
local update = NDCore.Functions.DepositMoney(amount, player)
|
2022-07-08 23:19:28 +02:00
|
|
|
TriggerClientEvent("ND_Banks:update", player, update)
|
|
|
|
|
end)
|
|
|
|
|
|
2022-09-01 04:11:48 -04:00
|
|
|
RegisterNetEvent("ND_Banks:transfer", function(amount, target)
|
2022-07-08 23:19:28 +02:00
|
|
|
local player = source
|
2022-07-16 00:12:02 -04:00
|
|
|
local update = NDCore.Functions.TransferBank(amount, player, target)
|
2022-07-08 23:19:28 +02:00
|
|
|
TriggerClientEvent("ND_Banks:update", player, update)
|
2022-09-23 20:19:15 +02:00
|
|
|
end)
|