Skip to content

Commit

Permalink
Merge pull request GmodStarfall#120 from Xandaros/iss119
Browse files Browse the repository at this point in the history
Implement concmd function
  • Loading branch information
awilliamson committed Mar 21, 2014
2 parents 117bd64 + 86ff53b commit 63a8306
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/starfall/libs_sh/builtins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,13 @@ function SF.DefaultEnvironment.error ( msg )
error( msg or "an unspecified error occured", 2 )
end

--- Execute a console command
-- @param cmd Command to execute
function SF.DefaultEnvironment.concmd ( cmd )
SF.CheckType( cmd, "string" )
SF.instance.player:ConCommand( cmd )
end

-- ------------------------- Restrictions ------------------------- --
-- Restricts access to builtin type's metatables

Expand Down

0 comments on commit 63a8306

Please sign in to comment.