Onun için yapmanız gerek. Server.cfg ye girip;
start esx_addons_gcphone
start gcphone
start screenshot-basic
start xsound
restart gcphone
----------------
olarak açığınız zaman bir sıkıntı kalmiyackatır. Çünkü cmd de server açılırken kendi kendine restartlanmış olucaktır. Bu sıkıntı çoğu yerde mevcut. Umarım işinize yaramıştır.
sağol bu mesajı okumadan önce 3 saat önce fln tam çözmüştüm banka scripti esx uyarlı imiş galiba onu disc e uyarladım şeklinde.
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterServerEvent('orp:bank:deposit')
AddEventHandler('orp:bank:deposit', function(amount)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
if xPlayer.getInventoryItem('cash').count >= amount then
xPlayer.removeInventoryItem('cash', amount)
xPlayer.addAccountMoney('bank', tonumber(amount))
TriggerClientEvent('orp:bank:notify', _source, "success", "You successfully deposit $" .. amount)
else
TriggerClientEvent('orp:bank:notify', _source, "success", "$ Yeterli Paran Yok" .. amount)
end
end)
RegisterServerEvent('orp:bank:withdraw')
AddEventHandler('orp:bank:withdraw', function(amount)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local min = 0
amount = tonumber(amount)
min = xPlayer.getAccount('bank').money
if amount == nil or amount <= 0 or amount > min then
TriggerClientEvent('orp:bank:notify', _source, "error", "Invalid Amount")
else
xPlayer.removeAccountMoney('bank', amount)
xPlayer.addInventoryItem('cash', amount)
TriggerClientEvent('orp:bank:notify', _source, "success", "You successfully withdraw $" .. amount)
end
end)
RegisterServerEvent('orp:bank:balance')
AddEventHandler('orp:bank:balance', function()
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
balance = xPlayer.getAccount('bank').money
TriggerClientEvent('orp:bank:info', _source, balance)
end)
RegisterServerEvent('orp:bank:transfer')
AddEventHandler('orp:bank:transfer', function(to, amountt)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local xTarget = ESX.GetPlayerFromId(to)
local amount = amountt
local balance = 0
if(xTarget == nil or xTarget == -1) then
TriggerClientEvent('orp:bank:notify', _source, "error", "Recipient not found")
else
balance = xPlayer.getAccount('bank').money
zbalance = xTarget.getAccount('bank').money
if tonumber(_source) == tonumber(to) then
TriggerClientEvent('orp:bank:notify', _source, "error", "You cannot transfer money to yourself")
else
if balance <= 0 or balance < tonumber(amount) or tonumber(amount) <= 0 then
TriggerClientEvent('orp:bank:notify', _source, "error", "You don't have enough money for this transfer")
else
xPlayer.removeAccountMoney('bank', tonumber(amount))
xTarget.addAccountMoney('bank', tonumber(amount))
TriggerClientEvent('orp:bank:notify', _source, "success", "You successfully transfer $" .. amount)
TriggerClientEvent('orp:bank:notify', to, "success", "You have just received $" .. amount .. ' via transfer')
end
end
end
end)
Eklemeler yaptım server tarafına düzeldi sorun tekarardan teşşekür ederim.