mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Setup exp_scenario for commands
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user