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