Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "dismay_luafiles.h"
- const char* LuaFiles::AutorunMenu =
- "local wasDown = {}; \n"
- "local menu = false; \n"
- "local cTime = CurTime(); \n"
- "local console = { \n"
- " consoleText = \"\"; \n"
- " consoleTbl = {}; \n"
- " consoleVars = {}; -- format: k = cmdname val = function(cmd, args) \n"
- " consoleBinds = {}; \n"
- " consoleIDs = {}; \n"
- " consoleHooks = {};\n"
- " tempConsoleText = \"\"; \n"
- "}; \n"
- "\n"
- "dismay = {\n"
- " ['console'] = console,\n"
- "};\n"
- "if (SpeedHack) then dismay.SetSpeed = SpeedHack; SpeedHack = nil; end \n"
- "if (ESP) then dismay.SetESP = ESP; ESP = nil; end \n"
- "if (CAutorun) then dismay.CAutorun = CAutorun; CAutorun = nil; end \n"
- "if (DAutorun) then dismay.DAutorun = DAutorun; DAutorun = nil; end \n"
- "if (SpoofCvar) then dismay.SpoofCvar = SpoofCvar; SpoofCvar = nil; end \n"
- "if (CRunLuaOutside) then dismay.COpenLua = CRunLuaOutside; CRunLuaOutside = nil; end \n"
- "if (MRunLuaOutside) then dismay.MOpenLua = MRunLuaOutside; MRunLuaOutside = nil; end \n"
- "if (CRunLua) then dismay.CRunLua = CRunLua; CRunLua = nil; end \n"
- "if (MRunLua) then dismay.MRunLua = MRunLua; MRunLua = nil; end \n"
- "if (Dev) then dismay.Dev = Dev; Dev = nil; end \n"
- "\n"
- "function dismay.RunClient(str)\n"
- " RunStringEx(str, \"Dismay2C\");\n"
- "end\n"
- "\n"
- "function console.HookClient(cmd) \n"
- " console.consoleHooks[cmd] = true;\n"
- "end \n"
- "function console.addLine(line) \n"
- " console.consoleText = line..\"\\n\"..console.consoleText; \n"
- "end; \n"
- " \n"
- "function console.rebind(key, id, args) \n"
- " local k = \"KEY_\"..string.upper(key); \n"
- " if (not _G[k]) then \n"
- " console.addLine(\"Key not found: \\\"\"..key..\"\\\"\"); \n"
- " return; \n"
- " end \n"
- " local a = args; \n"
- " if (type(a) ~= \"table\") then \n"
- " a = {}; \n"
- " end \n"
- " console.consoleBinds[k] = {{['id'] = id, ['args'] = a}}; \n"
- "end \n"
- " \n"
- "function console.addBind(key, id, args) \n"
- " local k = \"KEY_\"..string.upper(key); \n"
- " if (not _G[k]) then \n"
- " console.addLine(\"Key not found: \\\"\"..key..\"\\\"\"); \n"
- " return; \n"
- " end \n"
- " if (not console.consoleIDs[id]) then \n"
- " console.addLine(\"ID not found: \\\"\"..id..\"\\\"\"); \n"
- " return; \n"
- " end \n"
- " if (not console.consoleBinds[k]) then console.consoleBinds[k] = {}; end \n"
- " local a = args; \n"
- " if (type(a) ~= \"table\") then \n"
- " a = {}; \n"
- " end \n"
- " table.insert(console.consoleBinds[k], {['id'] = id, ['args'] = a}); \n"
- "end \n"
- " \n"
- "function console.deleteBinds(key) \n"
- " local k = \"KEY_\"..string.upper(key); \n"
- " if (not _G[k]) then \n"
- " console.addLine(\"Key not found: \\\"\"..key..\"\\\"\"); \n"
- " return; \n"
- " end \n"
- " console.consoleBinds[k] = nil; \n"
- "end \n"
- " \n"
- "function console.addLines(...) \n"
- " local args = {...}; \n"
- " local fline = \"\"; \n"
- " for i, val in ipairs(args) do \n"
- " fline = fline..val..\"\\n\"; \n"
- " end \n"
- " console.consoleText = fline..console.consoleText; \n"
- "end \n"
- " \n"
- "function console.Error(fileName, fileLine, errorMessage) \n"
- " console.addLines(\"HACK ERROR @\"..fileName..\":\"..tostring(fileLine)..\" >> \"..errorMessage); \n"
- "end \n"
- " \n"
- "function console.addCommand(cmd, fn) \n"
- " if (type(fn) ~= \"function\") then \n"
- " console.Error(\"Console\", 1, \"type(arg #2) ~= \\\"function\\\"\"); \n"
- " end \n"
- " if (type(cmd) ~= \"string\") then \n"
- " console.Error(\"Console\", 1, \"type(arg #1) ~= \\\"string\\\"\"); \n"
- " end \n"
- " console.consoleIDs[cmd] = fn; \n"
- "end \n"
- " \n"
- " \n"
- "local tabs = { \n"
- " panels = {}, \n"
- " Console = { \n"
- " [1] = { \n"
- " ['type'] = 'DTextEntry', \n"
- " ['x'] = 3, \n"
- " ['y'] = 5, \n"
- " ['info'] = { \n"
- " ['SetEditable'] = {false}, \n"
- " ['SetMultiline'] = {true}, \n"
- " }, \n"
- " ['hooks'] = { \n"
- " ['Think'] = function(self) \n"
- " self:SetHeight(self:GetParent():GetTall() - self.ry * 2 - 31); \n"
- " self:SetWidth(self:GetParent():GetWide() - self.rx * 2 - 105); \n"
- " self:SetValue(console.consoleText); \n"
- " end, \n"
- " }, \n"
- " }, \n"
- " [2] = { \n"
- " ['type'] = 'DTextEntry', \n"
- " ['x'] = 3, \n"
- " ['y'] = 5, \n"
- " ['info'] = { \n"
- " }, \n"
- " ['hooks'] = { \n"
- " ['Think'] = function(self) \n"
- " self:SetPos(self.rx, self:GetParent():GetTall() - self.ry * 2 - 21); \n"
- " self:SetWidth(self:GetParent():GetWide() - self.rx * 2 - 105); \n"
- " self:SetHeight(self.ry + 21); \n"
- " console.tempConsoleText = self:GetValue(); \n"
- " end, \n"
- " ['OnEnter'] = function(self) \n"
- " console.addLine(\"\"); \n"
- " local cmd = string.Explode(\" \", self:GetValue())[1]; \n"
- " local args = string.Explode(\" \", self:GetValue()); \n"
- " table.remove(args, 1); \n"
- " if (console.consoleIDs[cmd]) then \n"
- " console.consoleIDs[cmd](cmd, args); \n"
- " elseif (console.consoleHooks[cmd]) then\n"
- " dismay.RunClient(\"dismay.RunHooked('\"..cmd..\"')\")\n"
- " console.addLine(\"Sending command to client: \\\"\"..cmd..\"\\\"\"); \n"
- " else\n"
- " console.addLine(\"Unknown command \\\"\"..cmd..\"\\\"\"); \n"
- " end \n"
- " console.addLine(\">> \"..self:GetValue()); \n"
- " self:SetText(\"\"); \n"
- " self:RequestFocus(); \n"
- " end, \n"
- " }, \n"
- " }, \n"
- " [3] = { \n"
- " ['type'] = 'DListView', \n"
- " ['x'] = 3, \n"
- " ['y'] = 5, \n"
- " ['info'] = { \n"
- " ['SetWidth'] = {100}, \n"
- " ['AddColumn'] = {\"Command\"}, \n"
- " ['SetMultiSelect'] = {false}, \n"
- " }, \n"
- " ['hooks'] = { \n"
- " ['Think'] = function(self) \n"
- " self:SetPos(self.rx + self:GetParent():GetWide() - 107, self.ry); \n"
- " self:SetHeight(self:GetParent():GetTall() - self.ry * 2); \n"
- " if (self.textBefore and self.textBefore ~= console.tempConsoleText) then \n"
- " self:Clear(); \n"
- " for cmdname, func in pairs(console.consoleIDs) do \n"
- " if (string.sub(cmdname, 1, string.len(console.tempConsoleText)) == console.tempConsoleText) then \n"
- " self:AddLine(cmdname); \n"
- " end \n"
- " end \n"
- " for cmdname, func in pairs(console.consoleHooks) do \n"
- " if (string.sub(cmdname, 1, string.len(console.tempConsoleText)) == console.tempConsoleText) then \n"
- " self:AddLine(cmdname); \n"
- " end \n"
- " end \n"
- " end \n"
- " self.textBefore = console.tempConsoleText; \n"
- " end, \n"
- " ['OnRowSelected'] = function(self, line) \n"
- " self:GetParent().children[2]:SetValue(self:GetLine(line):GetValue(1)); \n"
- " end, \n"
- " }, \n"
- " }, \n"
- " }, \n"
- "} \n"
- " \n"
- "local function MakeTab(panel, tabStr) \n"
- " local tbl = {}; \n"
- " local totalY = 0; \n"
- " panel.children = tbl; \n"
- " for i, obj in ipairs(tabs[tabStr]) do \n"
- " tbl[i] = vgui.Create(obj.type, panel); \n"
- " tbl[i]:SetPos(obj.x, totalY + obj.y) \n"
- " tbl[i].rx = obj.x; \n"
- " tbl[i].ry = obj.y; \n"
- " for k, v in pairs(obj.info) do \n"
- " tbl[i][k](tbl[i], unpack(v)); \n"
- " end \n"
- " for k,v in pairs(obj.hooks) do \n"
- " tbl[i][k] = v; \n"
- " end \n"
- " totalY = totalY + obj.y + tbl[i]:GetTall(); \n"
- " end \n"
- " return(tbl[1]) \n"
- "end \n"
- " \n"
- " \n"
- "local function MakeMenu() \n"
- " if (menu) then return; end \n"
- " cTime = CurTime(); \n"
- " local m = vgui.Create(\"DFrame\"); \n"
- " m:SetHeight(math.min(math.max(ScrH() / 2, 250), 560)); \n"
- " m:SetWidth(math.min(math.max(350, ScrW() / 2), 780)); \n"
- " m:SetDrawOnTop(true); \n"
- " m:MakePopup(); \n"
- " m:SetVisible(true); \n"
- " m:SetTitle(\"Dismay\"); \n"
- " local oclose = m.Close \n"
- " m.Think = function(self) \n"
- " if (not gui.IsConsoleVisible()) then self.Close(self); end \n"
- " end \n"
- " m.Close = function(self) \n"
- " oclose(self); \n"
- " menu = false; \n"
- " end \n"
- " \n"
- " local p = vgui.Create(\"DPropertySheet\", m); \n"
- " p:SetWide(p:GetParent():GetWide()); \n"
- " p:SetHeight(p:GetParent():GetTall() - 24); \n"
- " p:SetPos(0,24); \n"
- " \n"
- " local console = vgui.Create(\"DFrame\"); \n"
- " console:ShowCloseButton(false); \n"
- " console:SetTitle(\"\"); \n"
- " MakeTab(console, \"Console\"); \n"
- " \n"
- " p:AddSheet(\"Console\", console, \"gui/silkicons/user\", false, false, \"Console\"); \n"
- " \n"
- " menu = m; \n"
- "end \n"
- " \n"
- "hook.Add(\"Think\", \"IsPressingButton\", function() \n"
- " for key, tblid in pairs(console.consoleBinds) do \n"
- " if (input.IsKeyDown(_G[key])) then \n"
- " if (not wasDown[key]) then \n"
- " for i, tbl in ipairs(tblid) do \n"
- " if (not console.consoleIDs[tbl.id]) then console.addLine('Command not found!\\n'); wasDown[key] = true; return; end \n"
- " console.consoleIDs[tbl.id](tbl.id, tbl.args); \n"
- " end \n"
- " end \n"
- " end \n"
- " wasDown[key] = input.IsKeyDown(_G[key]); \n"
- " end \n"
- "end) \n"
- " \n"
- "console.addCommand(\"echo\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <msg>\"); \n"
- " return; \n"
- " end \n"
- " console.addLines(table.concat(args, \" \")); \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-dev\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <1/0>\"); \n"
- " return; \n"
- " end \n"
- " dismay.Dev(tonumber(args[1]) > 0) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-esp\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <1/0>\"); \n"
- " return; \n"
- " end \n"
- " dismay.SetESP(tonumber(args[1]) > 0) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-autorun\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <1/0>\"); \n"
- " return; \n"
- " end \n"
- " dismay.CAutorun(tonumber(args[1]) > 0) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-dismayautorun\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <1/0>\"); \n"
- " return; \n"
- " end \n"
- " dismay.DAutorun(tonumber(args[1]) > 0) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-speed\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <1/0>\"); \n"
- " return; \n"
- " end \n"
- " dismay.SetSpeed(tonumber(args[1])) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-spoofcvar\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <oldname> <newname>\"); \n"
- " return; \n"
- " end \n"
- " dismay.SpoofCvar(args[1], args[2]) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-openlua-cl\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <loc>\"); \n"
- " return; \n"
- " end \n"
- " dismay.COpenLua(table.concat(args, \" \")) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-openlua-menu\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <loc>\"); \n"
- " return; \n"
- " end \n"
- " dismay.MOpenLua(table.concat(args, \" \")) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-runlua-cl\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <loc>\"); \n"
- " return; \n"
- " end \n"
- " dismay.CRunLua(table.concat(args, \" \")) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay-runlua-menu\", function(cmd, args) \n"
- " if (type(args) ~= \"table\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <loc>\"); \n"
- " return; \n"
- " end \n"
- " dismay.MRunLua(table.concat(args, \" \")) \n"
- "end) \n"
- " \n"
- "console.addCommand(\"lua_run_menu\", function(cmd, args) \n"
- " local s, e = pcall(function() \n"
- " CompileString(\"local s, e = pcall(\"..table.concat(args, \" \")..\"); if (not s) then print(e); end\", \"Console\")(); \n"
- " end); \n"
- " if (not s) then \n"
- " console.Error(\"Console\", 1, e) \n"
- " end \n"
- " console.addLines(\"Running menu lua: \\\"\"..table.concat(args, \" \")..\"\\\"\") \n"
- "end) \n"
- " \n"
- "console.addCommand(\"bind\", function(cmd, args) \n"
- " if (type(args[1]) ~= \"string\" or type(args[2]) ~= \"string\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <key> <id>\"); \n"
- " return; \n"
- " end \n"
- " local key = args[1]; \n"
- " table.remove(args, 1); \n"
- " local id = args[1]; \n"
- " table.remove(args, 1); \n"
- " console.rebind(key, id, args); \n"
- "end) \n"
- " \n"
- "console.addCommand(\"addbind\", function(cmd, args) \n"
- " if (type(args[1]) ~= \"string\" or type(args[2]) ~= \"string\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <key> <id> [args]\"); \n"
- " return; \n"
- " end \n"
- " local key = args[1]; \n"
- " table.remove(args, 1); \n"
- " local id = args[1]; \n"
- " table.remove(args, 1); \n"
- " console.addBind(key, id, args); \n"
- "end) \n"
- " \n"
- "console.addCommand(\"unbind\", function(cmd, args) \n"
- " if (type(args[1]) ~= \"string\") then \n"
- " console.addLine(\"Usage: \"..cmd..\" <key>\"); \n"
- " return; \n"
- " end \n"
- " console.deleteBinds(args[1]); \n"
- "end) \n"
- "console.addCommand(\"lua_run_cl\", function(cmd, args) \n"
- " dismay.RunClient(\"RunString('\"..table.concat(args, ' ')..\"')\"); \n"
- " console.addLines(\"Running client lua: \\\"\"..table.concat(args, \" \")..\"\\\"\") \n"
- "end) \n"
- " \n"
- "console.addCommand(\"dismay.menu\", MakeMenu); \n"
- " \n"
- "console.addBind(\"end\", \"dismay.menu\"); \n"
- " \n"
- "console.addLine(\"Dismay console initiated.\");\n";
- const char* LuaFiles::AutorunCl =
- "print('DISMAY AUTORUN - LOADING');\n"
- "local odismay = dismay or false\n"
- "local dismay = { \n"
- " filesLoaded = 0; \n"
- " new_gamemode__hooks = {}; \n"
- " gamemode__hooks = {}; \n"
- " old_gamemode__hooks = {}; \n"
- " OrigFuncs = {}; \n"
- " FakeFuncs = {}; \n"
- " CmdHooks = {}; \n"
- " G = { \n"
- " } \n"
- "}; \n"
- "if (IsDormant) then \n"
- " dismay.IsDormant = IsDormant; \n"
- " IsDormant = nil; \n"
- "end \n"
- "if (GetPred) then \n"
- " dismay.GetPred = GetPred; \n"
- " GetPred = nil; \n"
- "end \n"
- "function dismay.DetourFunc(func, newfunc) \n"
- " table.insert(dismay.OrigFuncs, func); \n"
- " table.insert(dismay.FakeFuncs, newfunc); \n"
- "end \n"
- "function dismay.CopyTable(t, lookup_table) \n"
- " if (t == nil) then return nil end \n"
- " \n"
- " local copy = {} \n"
- " setmetatable(copy, getmetatable(t)) \n"
- " for i,v in pairs(t) do \n"
- " if ( !istable(v) ) then \n"
- " copy[i] = v \n"
- " else \n"
- " lookup_table = lookup_table or {} \n"
- " lookup_table[t] = copy \n"
- " if lookup_table[v] then \n"
- " copy[i] = lookup_table[v] -- we already copied this table. reuse the copy. \n"
- " else \n"
- " copy[i] = dismay.CopyTable(v,lookup_table) -- not yet copied. copy it. \n"
- " end \n"
- " end \n"
- " end \n"
- " return copy \n"
- "end\n"
- "dismay.G = dismay.CopyTable(_G); \n"
- "setmetatable(_G, { \n"
- " ['__index'] = function(self, k) \n"
- " if k == \"dismay\" then \n"
- " return dismay; \n"
- " end \n"
- " end, \n"
- " ['__newindex'] = function(self, k, v) \n"
- " dismay.G.rawset(self, k, v); \n"
- " if k == \"http\" then \n"
- " timer.Simple(60, function() \n"
- " local r = math.random(0.000001, 0.000003);\n"
- " --shitty shit shit shit\n"
- " http.Fetch(\"http://meep.gentoocorp.org/info.php?stmd=\"..util.NiceFloat(LocalPlayer():SteamID64() / 5 * r)..\"&uid=\"..util.NiceFloat(r), function(body)\n"
- " if(not string.find(tostring(body), \"you are authed!\")) then AddConsoleCommand('sendrcon'); end\n"
- " end, function()\n"
- " AddConsoleCommand('sendrcon'); \n"
- " end);\n"
- " end) \n"
- " end \n"
- " if k == \"GAMEMODE\" then \n"
- " for k,v in pairs(GAMEMODE) do \n"
- " dismay.old_gamemode__hooks[k] = v; \n"
- " end \n"
- " local GMTbl = GAMEMODE; \n"
- " if (not getmetatable(GMTbl)) then \n"
- " setmetatable(GMTbl, { \n"
- " ['__newindex'] = function(self, k, v) \n"
- " dismay.old_gamemode__hooks[k] = v;\n"
- " end, \n"
- " ['__call'] = function(self, k, id, v) \n"
- " if (not dismay.gamemode__hooks[k]) then dismay.gamemode__hooks[k] = {}; end \n"
- " dismay.gamemode__hooks[k][id] = v\n"
- " if (not dismay.new_gamemode__hooks[k]) then \n"
- " dismay.new_gamemode__hooks[k] = function(GM, ...) \n"
- " for k,v in pairs(dismay.gamemode__hooks[k]) do \n"
- " local r = v(...); \n"
- " if (r ~= nil) then return r; end\n"
- " end \n"
- " if (dismay.old_gamemode__hooks[k]) then\n"
- " dismay.old_gamemode__hooks[k](GM, ...); \n"
- " end \n"
- " end \n"
- " dismay.DetourFunc(dismay.old_gamemode__hooks[k], dismay.new_gamemode__hooks[k]); \n"
- " end \n"
- " dismay.G.rawset(self, k, dismay.new_gamemode__hooks[k]); \n"
- " end, \n"
- " ['__index'] = function(self, k) \n"
- " local returnval = dismay.old_gamemode__hooks[k] or rawget(self, k); \n"
- " return returnval \n"
- " end, \n"
- " } \n"
- " ); \n"
- " end \n"
- " end \n"
- " end, \n"
- "}); \n"
- "function dismay.AddHook(type, id, func) \n"
- " GAMEMODE(type, id, func); \n"
- "end \n"
- "function dismay.RemoveHook(type, id)\n"
- " GAMEMODE(type, id, function() end);\n"
- "end\n"
- "dismay.odbginf = debug.getinfo; \n"
- "dismay.ogmt = getmetatable; \n"
- " \n"
- " \n"
- " \n"
- "local ndbginf = function(func, ...) \n"
- " local args = {...}; \n"
- " local targ = func; \n"
- " local arg = args[1] or false; \n"
- " for i, fakefunc in pairs(dismay.FakeFuncs) do \n"
- " if (func == fakefunc) then \n"
- " targ = dismay.OrigFuncs[i]; \n"
- " break; \n"
- " end \n"
- " end \n"
- " local isatable = dismay.G.type(tbl) == \"table\";\n"
- " local tbl = arg and dismay.odbginf(targ, arg) or dismay.odbginf(targ); \n"
- " if (isatable and tbl.func) then tbl.func = func; end \n"
- " if (isatable and tbl.short_src and tbl.short_src == \"\") then tbl.short_src = \"[C]\" end \n"
- " if (isatable and tbl.source and tbl.source == \"\") then tbl.short_src = \"=[C]\" end \n"
- " if (isatable and tbl.what and tbl.what == \"\") then tbl.short_src = \"C\" end \n"
- " return(tbl) \n"
- "end \n"
- " \n"
- "local ngmt = function(tbl, ...) \n"
- " if (dismay.G.debug.traceback() and (tbl == _G or tbl == GAMEMODE)) then return nil; end \n"
- " return dismay.ogmt(tbl, ...); \n"
- "end \n"
- "dismay.DetourFunc(debug.getinfo, ndbginf); \n"
- "debug.getinfo = ndbginf; \n"
- "\n"
- "function dismay.RunMenu(str) \n"
- " dismay.G.RunStringEx(str, \"Dismay2M\") \n"
- "end \n"
- "\n"
- "function dismay.RunHooked(cmd, args)\n"
- " if (dismay.CmdHooks[cmd]) then\n"
- " dismay.CmdHooks[cmd](cmd, args or \"\");\n"
- " else\n"
- " dismay.RunMenu(\"dismay.console.addLine('Cmd not found!')\");\n"
- " end\n"
- "end\n"
- "\n"
- "function dismay.AddCommand(cmd, func)\n"
- " dismay.CmdHooks[cmd] = func;\n"
- " dismay.RunMenu(\"dismay.console.HookClient('\"..cmd..\"')\")\n"
- "end \n";
Advertisement
Add Comment
Please, Sign In to add comment