Lua run (console command)
From GMod Wiki
- For other uses, see Lua run (disambiguation).
| | Go to: Console |
| Command | |
| Syntax | lua_run String code |
| Available On: | |
| Part Of: | Garry's Mod |
| Description: | |
| A console command that allows you to run lua code on the server. | |
Examples
| Description | You can run any valid lua code with this. |
|---|---|
| Used on | |
| Code | lua_run Entity(1):SetHealth(300) |
| Output | Set's the first player's health to 300. |
| Description | Variables defined in the code or in previous lua_run commands can be used. |
|---|---|
| Used on | |
| Code | lua_run zombie:Ignite() |
| Output | Sets our previously spawned zombie on fire. |