Начинающий
- Статус
- Оффлайн
- Регистрация
- 24 Окт 2023
- Сообщения
- 15
- Реакции
- 0
Код:
-- // https://github.com/perilouswithadollarsign/cstrike15_src/blob/f82112a2388b841d72cb62ca48ab1846dfcc11c8/engine/cdll_engine_int.cpp
engine_ptr = client.create_interface("engine.dll", "VEngineClient014")
_ServerCmd = vtable_thunk(6, "void(__thiscall*)(void*, const char*, bool)")
_ClientCmd = vtable_thunk(7, "void(__thiscall*)(void*, const char*)")
_ExecuteClientCmd = vtable_thunk(108, "void(__thiscall*)(void*, const char*)")
local engine = {
ServerCmd = function(self, cmd, reliable) -- // a command that is sent directly to the server
if engine_ptr then _ServerCmd(engine_ptr, cmd, reliable or true) end
end,
ClientCmd = function(self, cmd) -- // sends a command to the client
if engine_ptr then _ClientCmd(engine_ptr, cmd) end
end,
ExecuteClientCmd = function(self, cmd) -- // forced execution of a client command
if engine_ptr then _ExecuteClientCmd(engine_ptr, cmd) end
end
}
Example:
Код:
engine:ExecuteClientCmd("echo Hello world!")
очередной говнокод