RegisterNetEvent("okok:atmac")
AddEventHandler("okok:atmac", function()
local dict = 'anim@amb@prop_human_atm@interior@male@enter'
local anim = 'enter'
local ped = GetPlayerPed(-1)
ESX.TriggerServerCallback("okokBanking:GetPIN", function(pin)
if pin then
if not isBankOpened then
isBankOpened = true
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do
Citizen.Wait(7)
end
TaskPlayAnim(ped, dict, anim, 8.0, 8.0, -1, 0, 0, 0, 0, 0)
Citizen.Wait(Config.AnimTime)
ClearPedTasks(ped)
SetNuiFocus(true, true)
SendNUIMessage({
action = 'atm',
pin = pin,
})
end
else
exports['okokNotify']:Alert("BANK", "PIN Kodu ayarlamak için bankaya gidiniz", 5000, 'info')
end
end)
end)