Skip to content

Welcome to the official api!

Lets start with the main thing, exechackapi is an addition to the standard API for developing addons(GLUA).

there are 2 types of scripts, 1 popular - client, and menustate.

To run clientside name *.lua, for menustate name *.luamenu.
To autorun lua, add *_autorun.lua to the name.

dangerous functions are available in menustate that can change files on your computer, so launching in menustate is only possible with a cheat or changing game files, which the server cannot do.

client scripts work in the same environment with addons and this environment is limited so that the creators cannot harm you.
but in the environment menustate you can interact with the cheat menu and run scripts on the client environment through the function runtoclientside.

An example of the simplest script with the interaction of the menu and cfg cheat with launch on the client:

if IsInGame()then Derma_Message("run only in main menu","1","OK")return end
if exec_cfg_GetValue("PRINTONSPAWN")==nil then
if exechack_api.cfg_GetValue("PRINTONSPAWN")then
exec_menuaddtab("my tab",function()
	exec_menuaddcheckbox("print 1 on spawnserver",15,30,"PRINTONSPAWN","description")