local QBCore = exports['qb-core']:GetCoreObject() local Cooldown = false local cashA = 500 local cashB = 900 -- hack QBCore.Functions.CreateUseableItem('trojan_usb', function(source) local Player = QBCore.Functions.GetPlayer(source) TriggerClientEvent('hack:trojan_usb',source) end) -- Recompensa RegisterServerEvent("thugs-atmrobbery:success") AddEventHandler("thugs-atmrobbery:success",function() local src = source local Player = QBCore.Functions.GetPlayer(source) local bags = 1 local xworth = math.random(cashA, cashB) Player.Functions.AddMoney("cash", xworth, "market-paraaldı") --Player.Functions.AddItem("markedbills", tonumber(reward)) Player.Functions.RemoveItem("trojan_usb", 1) --TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items["markedbills"], "add") --TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['markedbills'], "add") TriggerEvent('qb-log:server:CreateLog', 'atmrobbery', 'ATM Soygunu Başarılı', 'green', string.format("**Oyuncu:** %s (%s)\n**CitizenID:** %s\n**Kazanılan Para:** $%s", GetPlayerName(src), src, Player.PlayerData.citizenid, xworth)) end) -- Cooldown RegisterServerEvent('thugs-atmrobbery:Server:BeginCooldown') AddEventHandler('thugs-atmrobbery:Server:BeginCooldown', function() Cooldown = true local timer = 60 * 1000 while timer > 0 do Wait(1000) timer = timer - 1000 if timer == 0 then Cooldown = false end end end) QBCore.Functions.CreateCallback("thugs-atmrobbery:Cooldown",function(source, cb) if Cooldown then cb(true) else cb(false) end end)