G.RunString
From GMod Wiki
Revision as of 20:21, 11 November 2009 by Crazy Quebecer  (Talk | contribs)
				
			| 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

 
			
			