Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Feb 8th, 2010 | Syntax: Lua | Size: 0.45 KB | Hits: 64 | Expires: Never
Copy text to clipboard
  1. local speed = 1 --Hvor ofte den skal bytte mellom navna i sekunder
  2.  
  3. local names = { -- Husk komma etter vært ord!
  4.         "G",
  5.         "Go",
  6.         "GoD",
  7.         "GoDN",
  8.         "GoDNe",
  9.         "GoDNeS",
  10.         "GoDNeSS",
  11. }
  12.  
  13. local name
  14. local counter = 0
  15. timer.Create("cycle names", speed, 0, function()
  16.         if counter >= #names then counter = 0 end
  17.         counter = counter + 1
  18.         name = names[counter]
  19. end)
  20.  
  21. hook.Add("Think", "aname", function()
  22.         RunConsoleCommand("setinfo", "name", name)
  23. end)