Garry's Mod Wiki
Maps can run Lua scripts via the lua_run
entity.
Here's an example on gm_construct
:
During the execution of the script, the following global variables are available:
The code can be ran on entity spawn via a spawnflag, or via its RunCode
input.
There's also the RunPassedCode
input, which will run any code passed as the input value. Never use double-quotation marks in any Hammer Output, it will corrupt the map file. Try using Double Square brackets instead.
This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.
Page content is automatically updated twice a day. Edits and history are not available.
Last Parsed: Loading...