mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 13:56:02 +01:00
AddEventHandler.... not needed <3
This commit is contained in:
@@ -131,8 +131,7 @@ RegisterNUICallback("useATM", function(data)
|
||||
end)
|
||||
|
||||
-- update the balance on the ui and confirm if the deposit/withdraw was successful.
|
||||
RegisterNetEvent("ND_ATMs:update")
|
||||
AddEventHandler("ND_ATMs:update", function(status)
|
||||
RegisterNetEvent("ND_ATMs:update", function(status)
|
||||
Citizen.Wait(1000)
|
||||
local selectedCharacter = NDCore.Functions.GetSelectedCharacter()
|
||||
SendNUIMessage({
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
NDCore = exports["ND_Core"]:GetCoreObject()
|
||||
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)
|
||||
RegisterNetEvent("ND_ATMs:withdraw", function(amount)
|
||||
local player = source
|
||||
local update = NDCore.Functions.WithdrawMoney(amount, player)
|
||||
TriggerClientEvent("ND_ATMs:update", player, update)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("ND_ATMs:deposit")
|
||||
AddEventHandler("ND_ATMs:deposit", function(amount)
|
||||
RegisterNetEvent("ND_ATMs:deposit", function(amount)
|
||||
local player = source
|
||||
local update = NDCore.Functions.DepositMoney(amount, player)
|
||||
TriggerClientEvent("ND_ATMs:update", player, update)
|
||||
|
||||
Reference in New Issue
Block a user