Files
ND_Core/ND_ATMs/source/server.lua

16 lines
749 B
Lua
Raw Normal View History

NDCore = exports["ND_Core"]:GetCoreObject()
2022-07-16 00:12:02 -04:00
NDCore.Functions.VersionChecker("ND_ATMs", GetCurrentResourceName(), "https://github.com/Andyyy7666/ND_Framework", "https://raw.githubusercontent.com/Andyyy7666/ND_Framework/main/ND_ATMs/fxmanifest.lua")
RegisterNetEvent("ND_ATMs:withdraw")
AddEventHandler("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)
TriggerClientEvent("ND_ATMs:update", player, update)
2021-12-31 03:05:44 +01:00
end)
RegisterNetEvent("ND_ATMs:deposit")
AddEventHandler("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)
TriggerClientEvent("ND_ATMs:update", player, update)
2021-12-31 03:05:44 +01:00
end)