ChatCommand
ChatCommand:new(x)
-x
should be a table with functions to override.cmd:execute(name, param)
- execute command for playername
andparams
. Checks permissions.cmd:func(name, params)
- Abstract, needs to be implemented.
- Returns a tuple:
success, message
. Ifmessage
is non-nil, it will be sent to the caller.
Example:
rvwp.register_chat_command("echo", ChatCommand:new({
help = "<message>\n - message: will be repeated.",
func = function(self, name, param)
return true, param
end
}))