G.RunString
From GMod Wiki
(Redirected from RunString)
| Function | |
| Syntax |
RunString( String command ) Where is this used? |
| Description: | |
| Runs the specified string as a Lua command. Same as putting lua_run in console. | |
| Returns: | nil |
| Part of Library: | Global Functions |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.RunString]G.RunString [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | This will kill every player in the server. |
|---|---|
| Used on | |
| Code | RunString("for k,v in pairs( player.GetAll() ) do v:Kill() end"); |
| Output | N/A |
See Also
- game.ConsoleCommand
- player.ConCommand
- G.RunConsoleCommand
- Escaping - how to embed strings into RunString