commandsLib is a gLua library for commands chat in Garry's mod that make your life easier.
- Download and import into garrysmod/addons/commandslib or garrysmod/lua/autorun
- Use it 😁
local isValid = commandsLib.register( "hello", {
["prefix"] = { "/", "!" },
["execute"] = function( requester, options )
chat.AddText( Color( 255, 0, 0), "Hi " .. requester:Name() )
end,
["player"] = "local",
["showCommand"] = false
} )
More exemples:
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.