mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-22 04:12:19 +00:00
Legacy merged XP and SR shuffle commands
This commit is contained in:
parent
af51a7fa60
commit
5a0952678f
1 changed files with 6 additions and 21 deletions
|
@ -19,29 +19,14 @@ local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = wolfa_requireModule("commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local settings = wolfa_requireModule("util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandShuffle(clientId, command, type)
|
function commandShuffle(clientId, command)
|
||||||
if type == "xp" then
|
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled by XP.\";")
|
|
||||||
|
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "shuffle_teams")
|
|
||||||
elseif type == "sr" then
|
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled by SR.\";")
|
|
||||||
|
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "shuffle_teams_sr")
|
|
||||||
elseif type == nil then
|
|
||||||
if settings.get("fs_game") == "legacy" then
|
if settings.get("fs_game") == "legacy" then
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled by SR.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled.\";")
|
||||||
|
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "shuffle_teams_sr")
|
|
||||||
else
|
else
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled by XP.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled by XP.\";")
|
||||||
|
end
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "shuffle_teams")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "shuffle_teams")
|
||||||
end
|
|
||||||
else
|
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dshuffle usage: "..commands.getadmin("shuffle")["syntax"].."\";")
|
|
||||||
end
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
commands.addadmin("shuffle", commandShuffle, auth.PERM_SHUFFLE, "shuffle the teams to try and even them", "^2!shuffle ^9(^hxp|sr^9)", nil, (settings.get("g_standalone") == 0))
|
commands.addadmin("shuffle", commandShuffle, auth.PERM_SHUFFLE, "shuffle the teams to try and even them", "^2!shuffle ^9", nil, (settings.get("g_standalone") == 0))
|
||||||
|
|
Loading…
Reference in a new issue