gm_command - non-blocked game.ConsoleCommand

http://www.garrysmod.org/img/?t=dll&id=63151

Source included.

Usage: command.ServerCommand("command arg arg arg
")

Credits:
Making it - Deco (Da Man) (me)
Handy functions - Jinto

Why… Why did you do this?

What?

This is only the unblocked game.ConsoleCommand one.
Not the unblocked Player:ConCommand one.

Ah so clients are safe good :stuck_out_tongue:

Edit: Ooo 200th post :stuck_out_tongue:

Fucking WIN!

I don’t get this. Can you explain what it does?

Let’s your lua script’s execute whatever command you’d like on the server console without restrictions.

Which is hella useful.

Oh goodie :3

Useful for sv_cheats 1 mess arounds…

You really thought this would be used with clients and stuff?..

Anyways good job, I will be using this.

How exactly do I use this to get around the
“ConCommand blocked!” ?

[lua]
require"command"
command.ServerCommand("sv_cheats 1
")
[/lua]

Surprisingly, command.ServerCommands executes commands on your client when installed on the client.

You mean:
require(“command”)
?

Oh wow, did not know that. I thought lua would be far stricter.

Good to know, thanks.

I’m surprised at how many people haven’t read the Lua Manual.

I haven’t, but I did know about that… I just prefer normal syntax containing the (). It seems to keep my code neater…

Entirely opinion. There has been forever the argument on the best way to write languages (both languages such as English and programming languages), but in the end it almost always comes down to opinion, which can never be resolved perfectly.

Can you use this to get around something like
ConCommand blocked! (gmod_tool gravtogglecontroller)

Try

RunConsoleCommand( “gmod_tool”, “gravtogglecontroller” )