Module cityrp.command

CityRP Commands Library.

Module Overview

Functions

cityrp.command.add(command, access, arguments, callback[, category[, help[, tip[, emgr]]]]) Add a new command.
cityrp.command.deprecate(cmd[, msg]) Deprecate a command.
cityrp.command.consoleCommand(player, command, arguments) Handle a player console command.

Functions

cityrp.command.add(command, access, arguments, callback[, category[, help[, tip[, emgr]]]])
Add a new command.

Parameters:

  • command string Command string to add.
  • access string Access flag.
  • arguments number Number of arguments to require.
  • callback func Command callback, takes Player and Arguments Table params.
  • category string Category to add the command help under. (optional)
  • help string Help message if bad arguments are passed. (optional)
  • tip string Command description. (optional)
  • emgr bool Event Manager bypass. (optional)
cityrp.command.deprecate(cmd[, msg])
Deprecate a command. This shows a warning to the user when used.

Parameters:

  • cmd string Command to deprecated
  • msg string Additional message to show. If this is a single word, this is assumed as a command. (optional)
cityrp.command.consoleCommand(player, command, arguments)
Handle a player console command.

Parameters:

  • player Player Player running the command.
  • command string The wrapper command being ran.
  • arguments tab Arguments.