Files
ND_Core/ND_Banks/source/server.lua

20 lines
914 B
Lua
Raw Normal View History

NDCore = exports["ND_Core"]:GetCoreObject()
2022-07-16 00:12:02 -04:00
NDCore.Functions.VersionChecker("ND_Banks", GetCurrentResourceName(), "https://github.com/Andyyy7666/ND_Framework", "https://raw.githubusercontent.com/Andyyy7666/ND_Framework/main/ND_Banks/fxmanifest.lua")
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)
end)