Advertisement
quintosh

Untitled

Jun 7th, 2012
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. function DumpSIDs()
  2. local SIDs = {}
  3.    for k, v in pairs(player.GetAll()) do
  4.       if ValidEntity(v) then
  5.          table.insert(SIDs, v:Nick() .. v:SteamID())
  6.       if !file.Exists("logs/SIDs.txt") then
  7.       file.Write("logs/SIDs.txt", "[" ..v:Nick() .. "]" .. ":" .. v:SteamID() .. "\n"  )
  8.    else
  9.       file.Append("logs/SIDs.txt", "[" ..v:Nick() .. "]" .. ":" .. v:SteamID() .. "\n"  )
  10.          end
  11.       end
  12.    end
  13. end
  14.  
  15. local Target
  16.  
  17. concommand.Add("getSIDs", DumpSIDs)
  18. concommand.Add("sid", function(p, c, a)
  19.    for k, v in pairs(player.GetAll()) do
  20.   if ValidEntity(v) and v ~= LocalPlayer() then
  21.   if string.match(string.lower(v:Nick()), string.lower(a[1])) then
  22.             Target = v
  23.          end
  24.       end
  25.      end
  26.       SetClipboardText(Target:SteamID())
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement