Help! lua scripts in c++

butcherhook

Platinian
could someone explain how can i add lua/custom lua api (like hooks or so, lua api stuff that hvh cheats have, even in minecraft) in mod menu so people can create custom functions besides using built in functions, does that work like macro code language that just call existing things written in c++? thanks
 
Yes, it works similarly to a macro/code language. You embed a Lua interpreter (like LuaJIT) into your C++ mod menu, expose your C++ functions (e.g., game hooks, memory edits) to Lua via bindings (like luaL_Reg or libraries like sol2 or luabridge), and then users write Lua scripts that call those exposed functions. Lua doesn't replace C++; it just calls into it through your API.
 
Back
Top Bottom