Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local nt = dismay.CopyTable(net);
- local nnet = {};
- local NetStuff = {};
- dismay.NetStuff = NetStuff;
- local changed = {
- Start = true;
- SendToServer = true;
- };
- local curname;
- local curnet;
- for k,v in pairs(net) do
- if(changed[k]) then continue; end
- if(string.sub(k, 1, 5) == "Write") then continue; end
- nnet[k] = function(...)
- local ret = nt[k](...);
- curnet[#curnet + 1] = {type = string.sub(k, 6); value = {...}};
- return ret;
- end
- end
- function nnet.Start(name)
- curnet = {};
- curname = name;
- return nt.Start(name);
- end
- function nnet.SendToServer()
- NetStuff[curname] = NetStuff[curname] or {};
- NetStuff[curname][#NetStuff[curname] + 1] = curnet;
- return nt.SendToServer();
- end
- for k,v in pairs(net) do
- dismay.SpoofFunction(net[k], nnet[k]);
- net[k] = nnet[k];
- end
Advertisement
Add Comment
Please, Sign In to add comment