Merhabalar Okok Banking Scriptini Kurdum Çalıştırdım Ancak Bankadan Para Çekip Yatırmıyor Forumda Gezindim Fakat Çözüm Bulamadım
RegisterServerEvent("okokBankingepositMoney")
AddEventHandler("okokBankingepositMoney", function(amount)
local _source = source
local xPlayer = QBCore.Functions.GetPlayer(_source)
local playerMoney = xPlayer.PlayerData.money.cash
if amount <= playerMoney then
xPlayer.Functions.RemoveMoney('cash', amount)
xPlayer.Functions.AddMoney('bank', amount)
xPlayer = QBCore.Functions.GetPlayer(_source)
TriggerEvent('okokBanking:AddDepositTransaction', amount, _source)
TriggerClientEvent('okokBanking:updateTransactions', _source, xPlayer.PlayerData.money.bank, xPlayer.PlayerData.money.cash)
TriggerClientEvent('okokNotify:Alert', _source, "BANK", "You have deposited "..amount.."€", 5000, 'success')
else
TriggerClientEvent('okokNotify:Alert', _source, "BANK", "You don't have that much money on you", 5000, 'error')
end
end)
RegisterServerEvent("okokBanking:WithdrawMoney")
AddEventHandler("okokBanking:WithdrawMoney", function(amount)
local _source = source
local xPlayer = QBCore.Functions.GetPlayer(_source)
local playerMoney = xPlayer.PlayerData.money.bank
if amount <= playerMoney then
xPlayer.Functions.RemoveMoney('bank', amount)
xPlayer.Functions.AddMoney('cash', amount)
xPlayer = QBCore.Functions.GetPlayer(_source)
TriggerEvent('okokBanking:AddWithdrawTransaction', amount, _source)
TriggerClientEvent('okokBanking:updateTransactions', _source, xPlayer.PlayerData.money.bank, xPlayer.PlayerData.money.cash)
TriggerClientEvent('okokNotify:Alert', _source, "BANK", "You have withdrawn "..amount.."€", 5000, 'success')
else
TriggerClientEvent('okokNotify:Alert', _source, "BANK", "You don't have that much money on the bank", 5000, 'error')
end
end)
Sorun Burayla Alakalı Olabilirmi
RegisterServerEvent("okokBankingepositMoney")
AddEventHandler("okokBankingepositMoney", function(amount)
local _source = source
local xPlayer = QBCore.Functions.GetPlayer(_source)
local playerMoney = xPlayer.PlayerData.money.cash
if amount <= playerMoney then
xPlayer.Functions.RemoveMoney('cash', amount)
xPlayer.Functions.AddMoney('bank', amount)
xPlayer = QBCore.Functions.GetPlayer(_source)
TriggerEvent('okokBanking:AddDepositTransaction', amount, _source)
TriggerClientEvent('okokBanking:updateTransactions', _source, xPlayer.PlayerData.money.bank, xPlayer.PlayerData.money.cash)
TriggerClientEvent('okokNotify:Alert', _source, "BANK", "You have deposited "..amount.."€", 5000, 'success')
else
TriggerClientEvent('okokNotify:Alert', _source, "BANK", "You don't have that much money on you", 5000, 'error')
end
end)
RegisterServerEvent("okokBanking:WithdrawMoney")
AddEventHandler("okokBanking:WithdrawMoney", function(amount)
local _source = source
local xPlayer = QBCore.Functions.GetPlayer(_source)
local playerMoney = xPlayer.PlayerData.money.bank
if amount <= playerMoney then
xPlayer.Functions.RemoveMoney('bank', amount)
xPlayer.Functions.AddMoney('cash', amount)
xPlayer = QBCore.Functions.GetPlayer(_source)
TriggerEvent('okokBanking:AddWithdrawTransaction', amount, _source)
TriggerClientEvent('okokBanking:updateTransactions', _source, xPlayer.PlayerData.money.bank, xPlayer.PlayerData.money.cash)
TriggerClientEvent('okokNotify:Alert', _source, "BANK", "You have withdrawn "..amount.."€", 5000, 'success')
else
TriggerClientEvent('okokNotify:Alert', _source, "BANK", "You don't have that much money on the bank", 5000, 'error')
end
end)
Sorun Burayla Alakalı Olabilirmi