Készítő: anyad, 4 éve frissítve, szöveg nyelve: Lua.
Beágyazás:
  1. local auto_disable_time = 20 -- 20 masodperc
  2. local round_start_plus_time_offset = 0.5
  3.  
  4. local timeout_queue = {}
  5.  
  6. function setTimeout(callback, timeVal)
  7.         table.insert(timeout_queue, {
  8.                 cb = callback,
  9.                 exec_time = GlobalVars.curtime + timeVal
  10.         })
  11. end
  12.  
  13. -- Timeout
  14. Cheat.RegisterCallback("draw", function()
  15.         local time = GlobalVars.curtime
  16.  
  17.         for i,v in ipairs(timeout_queue) do
  18.                 if (v.exec_time <= time) then
  19.                         v.cb()
  20.                         table.remove(timeout_queue, i)
  21.                 end
  22.         end
  23. end)
  24.  
  25. Cheat.RegisterCallback("events", function(e)
  26.         local event_name = e:GetName()
  27.         local nezu_crasher_active = CVar.FindVar("nezu_crasher_active")
  28.        
  29.         if (
  30.                 event_name == 'cs_round_final_beep' and
  31.                 nezu_crasher_active ~= nil
  32.         ) then
  33.                 print('Round start crasheltetes nokedli modra!')
  34.                 setTimeout(function() nezu_crasher_active:SetString('1'); end, round_start_plus_time_offset)
  35.                 setTimeout(function() nezu_crasher_active:SetString('0'); end, auto_disable_time + round_start_plus_time_offset)
  36.         end
  37. end)
  38.