42 - RegisterServerEvent("route68_kasyno:WymienZetony")
AddEventHandler("route68_kasyno:WymienZetony", function(count)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
if xPlayer then
local xItem = xPlayer.getQuantity('zetony')
if xItem < then
TriggerClientEvent('pNotify:SendNotification', _source, {text = 'Senin o kadar jetonun yok!'})
elseif xItem.count >= count then
local kwota = math.floor(count * 1)
xPlayer.removeInventoryItem('zetony', count)
xPlayer.addMoney(kwota)
TriggerClientEvent('pNotify:SendNotification', _source, {text = 'Sende $'..kwota..' için '..count..' jeton.'})
end
end
57 - end)
bununla degiştirp denermisniz