Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Todo:
- -- add string.find check so it doesn't add the same nick for the same SID more than once
- -- workaround for PlayerAuthed hook (or replace with a timer once ^ works)
- function DumpSIDs()
- local SIDs = {}
- for k, v in pairs(player.GetAll()) do
- if ValidEntity(v) then
- table.insert(SIDs, v:Nick() .. v:SteamID())
- for k1, v1 in pairs(player.GetAll()) do
- if ValidEntity(v) then
- if !file.Exists("logs/SIDs.txt") then
- file.Write("logs/SIDs.txt", "[" ..v:Nick() .. "]" .. ":" .. v:SteamID() .. "\n" )
- else
- filex.Append("logs/SIDs.txt", "[" ..v:Nick() .. "]" .. ":" .. v:SteamID() .. "\n" )
- end
- end
- end
- end
- end
- end
- local Target
- concommand.Add("getSIDs", DumpSIDs)
- concommand.Add("sid", function()
- for k, v in pairs(player.GetAll()) do
- if ValidEntity(v) then
- if string.match(v:Nick() .. v:SteamID(), SIDs) then
- Target = v
- end
- end
- end
- SetClipboardText(Target)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement