Setup exp_scenario for commands

This commit is contained in:
Cooldude2606
2024-10-20 02:42:14 +01:00
parent 34a7879761
commit e78234898e
31 changed files with 2412 additions and 199 deletions

View File

@@ -9,13 +9,17 @@ System command to execute a command as another player using their permissions (e
local Commands = require("modules/exp_commands")
Commands.new("_sudo", { "exp-commands-sudo.description" })
:add_flags{ "system_only" }
Commands.new("_sudo", { "exp-commands_sudo.description" })
:argument("player", { "exp-commands_sudo.arg-player" }, Commands.types.player)
:argument("command", { "exp-commands_sudo.arg-command" }, Commands.types.key_of(Commands.registered_commands))
:argument("arguments", { "exp-commands_sudo.arg-arguments" }, Commands.types.string)
:enable_auto_concatenation()
:argument("player", { "exp-commands-sudo.arg-player" }, Commands.types.player)
:argument("command", { "exp-commands-sudo.arg-command" }, Commands.types.string_key(Commands.registered_commands))
:argument("arguments", { "exp-commands-sudo.arg-arguments" }, Commands.types.string)
:add_flags{ "system_only" }
:register(function(_player, player, command, parameter)
--- @cast player LuaPlayer
--- @cast command Commands.ExpCommand
--- @cast parameter string
--- @diagnostic disable-next-line: invisible
return Commands._event_handler{
name = command.name,