Neler yeni

Foruma hoş geldin, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

Türkiye'nin İlk ve tek FiveM forum adresi

Forum adresimize hoş geldin FiveMTürk olarak amacımız siz değerli kullanıcılarımıza en aktif fikir ve paylaşım platformu sunmak bir yana en güvenilir şekilde alışveriş yapabileceğiniz bir platform sunmaktır.
DF DF
DF DF
DF DF

Soru ATMDEN PARA ÇEKERKEN BEKLEME

ShelbyMert

Üye
Yasaklandı
FT Kullanıcı
Katılım
5 yıl 11 gün
Mesajlar
80
Atmden Para Çekerken Bekleme Scripti Olan Var mı ? Kart Veriliyor Altta Bar Falan Çıkıyor o
 
DF
new_banking/client/client.lua içerisindeki

Kod:
if bankMenu then
    Citizen.CreateThread(function()
    while true do
        Wait(0)
    if nearBank() or nearATM() then
            DisplayHelpText("ATM'yi kullanmak için ~INPUT_PICKUP~ tuşuna basın~b~")
   
        if IsControlJustPressed(1, 38) then
            inMenu = true
            SetNuiFocus(true, true)
            SendNUIMessage({type = 'openGeneral'})
            TriggerServerEvent('bank:balance')
            local ped = GetPlayerPed(-1)
        end
    end
               
        if IsControlJustPressed(1, 322) then
        inMenu = false
            SetNuiFocus(false, false)
            SendNUIMessage({type = 'close'})
        end
    end
    end)
end
satırını bulup aşağıdakiyle değiştirin.

Kod:
if bankMenu then
    Citizen.CreateThread(function()
    while true do
        Wait(0)
    if nearBank() or nearATM() then
            DisplayHelpText("ATM'yi kullanmak için ~INPUT_PICKUP~ tuşuna basın~b~")
   
        if IsControlJustPressed(1, 38) then
            playAnim('mp_common', 'givetake1_a', 2500)
            exports['progressBars']:startUI(2500, "Kartı sokuluyor.")
            Citizen.Wait(3000)
            inMenu = true
            SetNuiFocus(true, true)
            SendNUIMessage({type = 'openGeneral'})
            TriggerServerEvent('bank:balance')
            local ped = GetPlayerPed(-1)
        end
    end
               
        if IsControlJustPressed(1, 322) then
        inMenu = false
            SetNuiFocus(false, false)
            SendNUIMessage({type = 'close'})
        end
    end
    end)
end
eğer kartı çıkarma animasyonu da istiyorsanız:

Kod:
RegisterNUICallback('NUIFocusOff', function()
    inMenu = false
    SetNuiFocus(false, false)
    SendNUIMessage({type = 'closeAll'})
end)
satırını bulup aşağıdakiyle değiştirin.

Kod:
RegisterNUICallback('NUIFocusOff', function()
    inMenu = false
    SetNuiFocus(false, false)
            playAnim('mp_common', 'givetake1_a', 2500)
            exports['progressBars']:startUI(2500, "Kartı çıkarıyorsun.")
            Citizen.Wait(2500)
    SendNUIMessage({type = 'closeAll'})
end)

ardından client.lua içerisinde herhangi bir yere bu fonksiyonu ekleyin.

Kod:
function playAnim(animDict, animName, duration)
    RequestAnimDict(animDict)
    while not HasAnimDictLoaded(animDict) do Citizen.Wait(0) end
    TaskPlayAnim(PlayerPedId(), animDict, animName, 1.0, -1.0, duration, 49, 1, false, false, false)
    RemoveAnimDict(animDict)
end
NOT: Yükleme animasyonu için script gereklidir.
 
DF
new_banking/client/client.lua içerisindeki

Kod:
if bankMenu then
    Citizen.CreateThread(function()
    while true do
        Wait(0)
    if nearBank() or nearATM() then
            DisplayHelpText("ATM'yi kullanmak için ~INPUT_PICKUP~ tuşuna basın~b~")
  
        if IsControlJustPressed(1, 38) then
            inMenu = true
            SetNuiFocus(true, true)
            SendNUIMessage({type = 'openGeneral'})
            TriggerServerEvent('bank:balance')
            local ped = GetPlayerPed(-1)
        end
    end
              
        if IsControlJustPressed(1, 322) then
        inMenu = false
            SetNuiFocus(false, false)
            SendNUIMessage({type = 'close'})
        end
    end
    end)
end
satırını bulup aşağıdakiyle değiştirin.

Kod:
if bankMenu then
    Citizen.CreateThread(function()
    while true do
        Wait(0)
    if nearBank() or nearATM() then
            DisplayHelpText("ATM'yi kullanmak için ~INPUT_PICKUP~ tuşuna basın~b~")
  
        if IsControlJustPressed(1, 38) then
            playAnim('mp_common', 'givetake1_a', 2500)
            exports['progressBars']:startUI(2500, "Kartı sokuluyor.")
            Citizen.Wait(3000)
            inMenu = true
            SetNuiFocus(true, true)
            SendNUIMessage({type = 'openGeneral'})
            TriggerServerEvent('bank:balance')
            local ped = GetPlayerPed(-1)
        end
    end
              
        if IsControlJustPressed(1, 322) then
        inMenu = false
            SetNuiFocus(false, false)
            SendNUIMessage({type = 'close'})
        end
    end
    end)
end
eğer kartı çıkarma animasyonu da istiyorsanız:

Kod:
RegisterNUICallback('NUIFocusOff', function()
    inMenu = false
    SetNuiFocus(false, false)
    SendNUIMessage({type = 'closeAll'})
end)
satırını bulup aşağıdakiyle değiştirin.

Kod:
RegisterNUICallback('NUIFocusOff', function()
    inMenu = false
    SetNuiFocus(false, false)
            playAnim('mp_common', 'givetake1_a', 2500)
            exports['progressBars']:startUI(2500, "Kartı çıkarıyorsun.")
            Citizen.Wait(2500)
    SendNUIMessage({type = 'closeAll'})
end)

ardından client.lua içerisinde herhangi bir yere bu fonksiyonu ekleyin.

Kod:
function playAnim(animDict, animName, duration)
    RequestAnimDict(animDict)
    while not HasAnimDictLoaded(animDict) do Citizen.Wait(0) end
    TaskPlayAnim(PlayerPedId(), animDict, animName, 1.0, -1.0, duration, 49, 1, false, false, false)
    RemoveAnimDict(animDict)
end
NOT: Yükleme animasyonu için script gereklidir.
Yükleme animasyonu dediğiniz mythic progressbar mıdır?
 
DF
Para Çekerken Oluyor Ama İşlem Bittikten Sonra Kartı Geri Vermiyor Ve Bugta Kalıyor
 
DF
öyle yaptım zaten sorun yok hiçbir yerde sadece parayı çektikten sonra bugta kalıyor
 
DF
Kod:
--================================================================================================--
--==                                VARIABLES - DO NOT EDIT                                     ==--
--================================================================================================--
ESX                         = nil
inMenu                      = true
local atbank = false
local bankMenu = true

function playAnim(animDict, animName, duration)
    RequestAnimDict(animDict)
    while not HasAnimDictLoaded(animDict) do Citizen.Wait(0) end
    TaskPlayAnim(PlayerPedId(), animDict, animName, 1.0, -1.0, duration, 49, 1, false, false, false)
    RemoveAnimDict(animDict)
end

--================================================================================================
--==                                THREADING - DO NOT EDIT                                     ==
--================================================================================================

--===============================================
--==           Base ESX Threading              ==
--===============================================
Citizen.CreateThread(function()
    while ESX == nil do
        TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
        Citizen.Wait(0)
    end
end)





--===============================================
--==             Core Threading                ==
--===============================================
if bankMenu then
    Citizen.CreateThread(function()
    while true do
        Wait(0)
    if nearBank() or nearATM() then
            DisplayHelpText(_U('atm_open'))

        if IsControlJustPressed(1, 38) then
            playAnim('mp_common', 'givetake1_a', 2500)
            Citizen.Wait(2500)
            inMenu = true
            SetNuiFocus(true, true)
            SendNUIMessage({type = 'openGeneral'})
            TriggerServerEvent('bank:balance')
            local ped = GetPlayerPed(-1)
        end
    end

        if IsControlJustPressed(1, 322) then
        inMenu = false
            SetNuiFocus(false, false)
            SendNUIMessage({type = 'close'})
        end
    end
    end)
end


--===============================================
--==             Map Blips                       ==
--===============================================

--BANK
Citizen.CreateThread(function()
    if Config.ShowBlips then
      for k,v in ipairs(Config.Bank)do
        local blip = AddBlipForCoord(v.x, v.y, v.z)
        SetBlipSprite (blip, v.id)
        SetBlipDisplay(blip, 4)
        SetBlipScale  (blip, 0.8)
        SetBlipColour (blip, 5)
        SetBlipAsShortRange(blip, true)
        BeginTextCommandSetBlipName("STRING")
        AddTextComponentString(_U('bank_blip'))
        EndTextCommandSetBlipName(blip)
      end
    end
end)

--ATM
Citizen.CreateThread(function()
    if Config.ShowBlips and Config.OnlyBank == false then
      for k,v in ipairs(Config.ATM)do
        local blip = AddBlipForCoord(v.x, v.y, v.z)
        SetBlipSprite (blip, v.id)
        SetBlipDisplay(blip, 277)
        SetBlipScale  (blip, 0.4)
        SetBlipColour (blip, 5)
        SetBlipAsShortRange(blip, true)
        BeginTextCommandSetBlipName("STRING")
        AddTextComponentString(_U('atm_blip'))
        EndTextCommandSetBlipName(blip)
      end
    end
end)


--===============================================
--==           Deposit Event                   ==
--===============================================
RegisterNetEvent('currentbalance1')
AddEventHandler('currentbalance1', function(balance)
    local id = PlayerId()
    local playerName = GetPlayerName(id)

    SendNUIMessage({
        type = "balanceHUD",
        balance = balance,
        player = playerName
        })
end)
--===============================================
--==           Deposit Event                   ==
--===============================================
RegisterNUICallback('deposit', function(data)
    TriggerServerEvent('bank:deposit', tonumber(data.amount))
    TriggerServerEvent('bank:balance')
end)

--===============================================
--==          Withdraw Event                   ==
--===============================================
RegisterNUICallback('withdrawl', function(data)
    TriggerServerEvent('bank:withdraw', tonumber(data.amountw))
    TriggerServerEvent('bank:balance')
end)

--===============================================
--==         Balance Event                     ==
--===============================================
RegisterNUICallback('balance', function()
    TriggerServerEvent('bank:balance')
end)

RegisterNetEvent('balance:back')
AddEventHandler('balance:back', function(balance)
    SendNUIMessage({type = 'balanceReturn', bal = balance})
end)


--===============================================
--==         Transfer Event                    ==
--===============================================
RegisterNUICallback('transfer', function(data)
    TriggerServerEvent('bank:transfer', data.to, data.amountt)
    TriggerServerEvent('bank:balance')
end)

--===============================================
--==         Result   Event                    ==
--===============================================
RegisterNetEvent('bank:result')
AddEventHandler('bank:result', function(type, message)
    SendNUIMessage({type = 'result', m = message, t = type})
end)

--===============================================
--==               NUIFocusoff                 ==
--===============================================
RegisterNUICallback('NUIFocusOff', function()
    inMenu = false
    SetNuiFocus(false, false)
    TriggerEvent("mythic_progbar:client:progress", {
        name = "bank_action",
        duration = 7500,
        label = "Kartını alıyorsun.",
        useWhileDead = false,
        canCancel = false,
        controlDisables = {
            disableMovement = true,
            disableCarMovement = true,
            disableMouse = false,
            disableCombat = true,
        },
        prop = {
        }
    }, function(status)
        if not status then
            -- Do Something If Event Wasn't Cancelled
        end
    end)
            playAnim('mp_common', 'givetake1_a', 2500)
            Citizen.Wait(2500)
    SendNUIMessage({type = 'closeAll'})
end)


--===============================================
--==            Capture Bank Distance          ==
--===============================================
function nearBank()
    local player = GetPlayerPed(-1)
    local playerloc = GetEntityCoords(player, 0)

    for _, search in pairs(Config.Bank) do
        local distance = GetDistanceBetweenCoords(search.x, search.y, search.z, playerloc['x'], playerloc['y'], playerloc['z'], true)

        if distance <= 3 then
            return true
        end
    end
end

function nearATM()
    local player = GetPlayerPed(-1)
    local playerloc = GetEntityCoords(player, 0)

    for _, search in pairs(Config.ATM) do
        local distance = GetDistanceBetweenCoords(search.x, search.y, search.z, playerloc['x'], playerloc['y'], playerloc['z'], true)

        if distance <= 2 then
            return true
        end
    end
end


function DisplayHelpText(str)
    SetTextComponentFormat("STRING")
    AddTextComponentString(str)
    DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end


new_banking/client/client.lua değiştir yeter...
 
DF

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kayıt ol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Şimdi kayıt ol
Giriş yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş yap

Bu konuyu görüntüleyen kullanıcılar

Tema düzenleyici

Tema özelletirmeleri

Granit arka planlar

Lütfen Javascript'i etkinleştirin!Javascript'i etkinleştirin!
// Adblock Kod Start // // Adblock Kod End//