mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Added settings and warnings
This commit is contained in:
@@ -45,7 +45,8 @@ removed=__1__ has one or more reports removed by __2__.
|
|||||||
[expcom-warnings]
|
[expcom-warnings]
|
||||||
received=__1__ received a warning from __2__ for __3__.
|
received=__1__ received a warning from __2__ for __3__.
|
||||||
player=__1__ has __2__ warnings and __3__/__4__ script warnings.
|
player=__1__ has __2__ warnings and __3__/__4__ script warnings.
|
||||||
list-tilte=The following player have this many warnings (and this many script warnings):
|
player-detail=__1__ gave warning for: __2__
|
||||||
|
list-title=The following player have this many warnings (and this many script warnings):
|
||||||
list=__1__: __2__ (__3__/__4__)
|
list=__1__: __2__ (__3__/__4__)
|
||||||
cleared=__1__ had all they warnings cleared by __2__.
|
cleared=__1__ had all they warnings cleared by __2__.
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ message-set=Your join message has been updated.
|
|||||||
saved=Your quickbar filters have been saved.
|
saved=Your quickbar filters have been saved.
|
||||||
|
|
||||||
[exp-required]
|
[exp-required]
|
||||||
|
Warnings=Warnings
|
||||||
|
Warnings-tooltip=The number of warnings that have been given to you by staff
|
||||||
|
Warnings-value-tooltip=The number of warnings that have been given to you by staff
|
||||||
[exp-settings]
|
[exp-settings]
|
||||||
Colour=Colour
|
Colour=Colour
|
||||||
Colour-tooltip=Your player colour
|
Colour-tooltip=Your player colour
|
||||||
@@ -20,6 +22,9 @@ QuickbarFilters-value-tooltip=Change by using /save-quickbar
|
|||||||
UsesAlt=Alt View
|
UsesAlt=Alt View
|
||||||
UsesAlt-tooltip=If you use alt view when you play
|
UsesAlt-tooltip=If you use alt view when you play
|
||||||
UsesAlt-value-tooltip=Change by pressing __CONTROL__show-info__
|
UsesAlt-value-tooltip=Change by pressing __CONTROL__show-info__
|
||||||
|
UsesServerUps=Server Ups
|
||||||
|
UsesServerUps-tooltip=If you use server ups view when you play
|
||||||
|
UsesServerUps-value-tooltip=Change by using /server-ups
|
||||||
Tag=Player Tag
|
Tag=Player Tag
|
||||||
Tag-tooltip=The tag that is shown after your name
|
Tag-tooltip=The tag that is shown after your name
|
||||||
Tag-value-tooltip=Change by using /tag
|
Tag-value-tooltip=Change by using /tag
|
||||||
|
|||||||
@@ -36,12 +36,14 @@ Commands.new_command('get-warnings', 'Gets the number of warnings a player has.
|
|||||||
local warnings = Warnings.get_warnings(player)
|
local warnings = Warnings.get_warnings(player)
|
||||||
local script_warnings = Warnings.get_script_warnings(player)
|
local script_warnings = Warnings.get_script_warnings(player)
|
||||||
local player_name_color = format_chat_player_name(player)
|
local player_name_color = format_chat_player_name(player)
|
||||||
Commands.print{'expcom-warnings.player', player_name_color, warnings, script_warnings, config.temp_warning_limit}
|
Commands.print{'expcom-warnings.player', player_name_color, #warnings, #script_warnings, config.temp_warning_limit}
|
||||||
|
for _, warning in ipairs(warnings) do
|
||||||
|
Commands.print{'expcom-warnings.player-detail', format_chat_player_name(warning.by_player_name), warning.reason}
|
||||||
|
end
|
||||||
else
|
else
|
||||||
local rtn = {}
|
local rtn = {}
|
||||||
local user_warnings = Warnings.user_warnings
|
|
||||||
local user_script_warnings = Warnings.user_script_warnings
|
local user_script_warnings = Warnings.user_script_warnings
|
||||||
for player_name, warnings in pairs(user_warnings) do
|
for player_name, warnings in pairs(Warnings.user_warnings:get_all()) do
|
||||||
rtn[player_name] = {#warnings, 0}
|
rtn[player_name] = {#warnings, 0}
|
||||||
end
|
end
|
||||||
for player_name, warnings in pairs(user_script_warnings) do
|
for player_name, warnings in pairs(user_script_warnings) do
|
||||||
@@ -50,7 +52,7 @@ Commands.new_command('get-warnings', 'Gets the number of warnings a player has.
|
|||||||
end
|
end
|
||||||
rtn[player_name][2] = #warnings
|
rtn[player_name][2] = #warnings
|
||||||
end
|
end
|
||||||
Commands.print{'expcom-warnings.list-tilte'}
|
Commands.print{'expcom-warnings.list-title'}
|
||||||
for player_name, warnings in pairs(rtn) do
|
for player_name, warnings in pairs(rtn) do
|
||||||
local player_name_color = format_chat_player_name(player_name)
|
local player_name_color = format_chat_player_name(player_name)
|
||||||
Commands.print{'expcom-warnings.list', player_name_color, warnings[1], warnings[2], config.temp_warning_limit}
|
Commands.print{'expcom-warnings.list', player_name_color, warnings[1], warnings[2], config.temp_warning_limit}
|
||||||
|
|||||||
@@ -28,8 +28,20 @@ local config = require 'config.warnings' --- @dep config.warnings
|
|||||||
|
|
||||||
local valid_player = Game.get_player_from_any
|
local valid_player = Game.get_player_from_any
|
||||||
|
|
||||||
|
--- Stores the quickbar filters for a player
|
||||||
|
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
||||||
|
local PlayerWarnings = PlayerData.Required:combine('Warnings')
|
||||||
|
PlayerWarnings:set_metadata{
|
||||||
|
stringify = function(value)
|
||||||
|
if not value then return 'You have no warnings against you' end
|
||||||
|
local count = 0
|
||||||
|
for _ in pairs(value) do count = count + 1 end
|
||||||
|
return 'You have '..count..' warnings against you'
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
local Warnings = {
|
local Warnings = {
|
||||||
user_warnings={},
|
user_warnings=PlayerWarnings,
|
||||||
user_script_warnings={},
|
user_script_warnings={},
|
||||||
events = {
|
events = {
|
||||||
--- When a warning is added to a player
|
--- When a warning is added to a player
|
||||||
@@ -52,7 +64,7 @@ local Warnings = {
|
|||||||
-- @tparam string reason the reason that the player was given a warning
|
-- @tparam string reason the reason that the player was given a warning
|
||||||
-- @tparam number warning_count the new number of warnings that the player has
|
-- @tparam number warning_count the new number of warnings that the player has
|
||||||
on_script_warning_added = script.generate_event_name(),
|
on_script_warning_added = script.generate_event_name(),
|
||||||
--- When a warning is remnoved from a player, by the script
|
--- When a warning is removed from a player, by the script
|
||||||
-- @event on_script_warning_removed
|
-- @event on_script_warning_removed
|
||||||
-- @tparam number player_index the index of the player who is having the warning removed
|
-- @tparam number player_index the index of the player who is having the warning removed
|
||||||
-- @tparam number warning_count the new number of warnings that the player has
|
-- @tparam number warning_count the new number of warnings that the player has
|
||||||
@@ -60,30 +72,24 @@ local Warnings = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local user_warnings = Warnings.user_warnings
|
|
||||||
local user_script_warnings = Warnings.user_script_warnings
|
local user_script_warnings = Warnings.user_script_warnings
|
||||||
Global.register({
|
Global.register(user_script_warnings, function(tbl)
|
||||||
user_warnings = user_warnings,
|
Warnings.user_script_warnings = tbl
|
||||||
user_script_warnings = user_script_warnings
|
user_script_warnings = tbl
|
||||||
}, function(tbl)
|
|
||||||
Warnings.user_warnings = tbl.user_warnings
|
|
||||||
Warnings.user_script_warnings = tbl.user_script_warnings
|
|
||||||
user_warnings = Warnings.user_warnings
|
|
||||||
user_script_warnings = Warnings.user_script_warnings
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--- Gets an array of warnings that the player has, always returns a list even if emtpy
|
--- Gets an array of warnings that the player has, always returns a list even if empty
|
||||||
-- @tparam LuaPlayer player the player to get the warning for
|
-- @tparam LuaPlayer player the player to get the warning for
|
||||||
-- @treturn table an array of all the warnings on this player, contains tick, by_player_name and reason
|
-- @treturn table an array of all the warnings on this player, contains tick, by_player_name and reason
|
||||||
function Warnings.get_warnings(player)
|
function Warnings.get_warnings(player)
|
||||||
return user_warnings[player.name] or {}
|
return PlayerWarnings:get(player.name, {})
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Gets the number of warnings that a player has on them
|
--- Gets the number of warnings that a player has on them
|
||||||
-- @tparam LuaPlayer player the player to count the warnings for
|
-- @tparam LuaPlayer player the player to count the warnings for
|
||||||
-- @treturn number the number of warnings that the player has
|
-- @treturn number the number of warnings that the player has
|
||||||
function Warnings.count_warnings(player)
|
function Warnings.count_warnings(player)
|
||||||
local warnings = user_warnings[player.name] or {}
|
local warnings = PlayerWarnings:get(player.name, {})
|
||||||
return #warnings
|
return #warnings
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -99,19 +105,21 @@ function Warnings.add_warning(player, by_player_name, reason)
|
|||||||
|
|
||||||
reason = reason or 'Non given.'
|
reason = reason or 'Non given.'
|
||||||
|
|
||||||
local warnings = user_warnings[player.name]
|
local warning_count
|
||||||
if not warnings then
|
PlayerWarnings:update(player.name, function(_, warnings)
|
||||||
warnings = {}
|
local warning = {
|
||||||
user_warnings[player.name] = warnings
|
by_player_name = by_player_name,
|
||||||
end
|
reason = reason
|
||||||
|
}
|
||||||
|
|
||||||
table.insert(warnings, {
|
if not warnings then
|
||||||
tick = game.tick,
|
warning_count = 1
|
||||||
by_player_name = by_player_name,
|
return {warning}
|
||||||
reason = reason
|
else
|
||||||
})
|
table.insert(warnings, warning)
|
||||||
|
warning_count = #warnings
|
||||||
local warning_count = #warnings
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
script.raise_event(Warnings.events.on_warning_added, {
|
script.raise_event(Warnings.events.on_warning_added, {
|
||||||
name = Warnings.events.on_warning_added,
|
name = Warnings.events.on_warning_added,
|
||||||
@@ -122,7 +130,7 @@ function Warnings.add_warning(player, by_player_name, reason)
|
|||||||
reason = reason
|
reason = reason
|
||||||
})
|
})
|
||||||
|
|
||||||
local action = config.actions[#warnings]
|
local action = config.actions[warning_count]
|
||||||
if action then
|
if action then
|
||||||
local _type = type(action)
|
local _type = type(action)
|
||||||
if _type == 'function' then
|
if _type == 'function' then
|
||||||
@@ -156,7 +164,7 @@ local function warning_removed_event(player, warning_by_name, removed_by_name, w
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Removes a warning from a player, always removes the earlyist warning, fifo
|
--- Removes a warning from a player, always removes the earliest warning, fifo
|
||||||
-- @tparam LuaPlayer player the player to remove a warning from
|
-- @tparam LuaPlayer player the player to remove a warning from
|
||||||
-- @tparam string by_player_name the name of the player who is doing the action
|
-- @tparam string by_player_name the name of the player who is doing the action
|
||||||
-- @treturn number the number of warnings that the player has
|
-- @treturn number the number of warnings that the player has
|
||||||
@@ -165,14 +173,17 @@ function Warnings.remove_warning(player, by_player_name)
|
|||||||
if not player then return end
|
if not player then return end
|
||||||
if not by_player_name then return end
|
if not by_player_name then return end
|
||||||
|
|
||||||
local warnings = user_warnings[player.name]
|
local warning, warning_count
|
||||||
if not warnings then return end
|
PlayerWarnings:update(player.name, function(_, warnings)
|
||||||
|
if not warnings then return end
|
||||||
|
warning = table.remove(warnings, 1)
|
||||||
|
warning_count = #warnings
|
||||||
|
end)
|
||||||
|
|
||||||
local warning = table.remove(warnings, 1)
|
if not warning then return end
|
||||||
|
warning_removed_event(player, warning.by_player_name, by_player_name, warning_count)
|
||||||
|
|
||||||
warning_removed_event(player, warning.by_player_name, by_player_name, #warnings)
|
return warning_count
|
||||||
|
|
||||||
return #warnings
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Removes all warnings from a player, will trigger remove event for each warning
|
--- Removes all warnings from a player, will trigger remove event for each warning
|
||||||
@@ -184,7 +195,7 @@ function Warnings.clear_warnings(player, by_player_name)
|
|||||||
if not player then return end
|
if not player then return end
|
||||||
if not by_player_name then return end
|
if not by_player_name then return end
|
||||||
|
|
||||||
local warnings = user_warnings[player.name]
|
local warnings = PlayerWarnings:get(player)
|
||||||
if not warnings then return end
|
if not warnings then return end
|
||||||
|
|
||||||
local warning_count = #warnings
|
local warning_count = #warnings
|
||||||
@@ -192,7 +203,7 @@ function Warnings.clear_warnings(player, by_player_name)
|
|||||||
warning_removed_event(player, warning.by_player_name, by_player_name, warning_count-n)
|
warning_removed_event(player, warning.by_player_name, by_player_name, warning_count-n)
|
||||||
end
|
end
|
||||||
|
|
||||||
user_warnings[player.name] = nil
|
PlayerWarnings:remove(player)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -249,7 +260,7 @@ function Warnings.add_script_warning(player, reason)
|
|||||||
return warning_count
|
return warning_count
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Script warning removed event tigger due to it being looped in clear script warnings
|
--- Script warning removed event trigger due to it being looped in clear script warnings
|
||||||
-- @tparam LuaPlayer player the player who is having a script warning removed
|
-- @tparam LuaPlayer player the player who is having a script warning removed
|
||||||
-- @tparam number warning_count the number of warning that the player has
|
-- @tparam number warning_count the number of warning that the player has
|
||||||
local function script_warning_removed_event(player, warning_count)
|
local function script_warning_removed_event(player, warning_count)
|
||||||
|
|||||||
@@ -3,10 +3,13 @@
|
|||||||
|
|
||||||
local Event = require 'utils.event' ---@dep utils.event
|
local Event = require 'utils.event' ---@dep utils.event
|
||||||
|
|
||||||
--- Stores the join message that the player have
|
--- Stores the visible state of alt mode
|
||||||
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
||||||
local UsesAlt = PlayerData.Settings:combine('UsesAlt')
|
local UsesAlt = PlayerData.Settings:combine('UsesAlt')
|
||||||
UsesAlt:set_default(false)
|
UsesAlt:set_default(false)
|
||||||
|
UsesAlt:set_metadata{
|
||||||
|
stringify = function(value) return value and 'Visible' or 'Hidden' end
|
||||||
|
}
|
||||||
|
|
||||||
--- When your data loads apply alt view if you have it enabled
|
--- When your data loads apply alt view if you have it enabled
|
||||||
UsesAlt:on_load(function(player_name, uses_alt)
|
UsesAlt:on_load(function(player_name, uses_alt)
|
||||||
|
|||||||
@@ -12,6 +12,13 @@ require 'config.expcore.command_general_parse'
|
|||||||
--- Stores the bonus for the player
|
--- Stores the bonus for the player
|
||||||
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
||||||
local PlayerBonus = PlayerData.Settings:combine('Bonus')
|
local PlayerBonus = PlayerData.Settings:combine('Bonus')
|
||||||
|
PlayerBonus:set_default(0)
|
||||||
|
PlayerBonus:set_metadata{
|
||||||
|
stringify = function(value)
|
||||||
|
if not value or value == 0 then return 'None set' end
|
||||||
|
return (value*100)..'%'
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
--- Apply a bonus amount to a player
|
--- Apply a bonus amount to a player
|
||||||
local function apply_bonus(player, amount)
|
local function apply_bonus(player, amount)
|
||||||
|
|||||||
@@ -8,6 +8,13 @@ local config = require 'config.preset_player_colours' --- @dep config.preset_pla
|
|||||||
--- Stores the colour that the player wants
|
--- Stores the colour that the player wants
|
||||||
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
||||||
local PlayerColours = PlayerData.Settings:combine('Colour')
|
local PlayerColours = PlayerData.Settings:combine('Colour')
|
||||||
|
PlayerColours:set_metadata{
|
||||||
|
stringify = function(value)
|
||||||
|
if not value then return 'None set' end
|
||||||
|
local c = value[1]
|
||||||
|
return string.format('Red: %d Green: %d Blue: %d', c[1], c[2], c[3])
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
--- Used to compact player colours to take less space
|
--- Used to compact player colours to take less space
|
||||||
local floor = math.floor
|
local floor = math.floor
|
||||||
|
|||||||
@@ -9,6 +9,14 @@ local config = require 'config.preset_player_quickbar' --- @dep config.preset_pl
|
|||||||
--- Stores the quickbar filters for a player
|
--- Stores the quickbar filters for a player
|
||||||
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
||||||
local PlayerFilters = PlayerData.Settings:combine('QuickbarFilters')
|
local PlayerFilters = PlayerData.Settings:combine('QuickbarFilters')
|
||||||
|
PlayerFilters:set_metadata{
|
||||||
|
stringify = function(value)
|
||||||
|
if not value then return 'No filters set' end
|
||||||
|
local count = 0
|
||||||
|
for _ in pairs(value) do count = count + 1 end
|
||||||
|
return count..' filters set'
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
--- Loads your quickbar preset
|
--- Loads your quickbar preset
|
||||||
PlayerFilters:on_load(function(player_name, filters)
|
PlayerFilters:on_load(function(player_name, filters)
|
||||||
|
|||||||
@@ -291,8 +291,8 @@ Gui.element(function(_, parent)
|
|||||||
local value = child:get(player_name)
|
local value = child:get(player_name)
|
||||||
if value ~= nil or metadata.show_always then
|
if value ~= nil or metadata.show_always then
|
||||||
if metadata.stringify then value = metadata.stringify(value) end
|
if metadata.stringify then value = metadata.stringify(value) end
|
||||||
Gui.centered_label(settings, 150, metadata.name or {'exp-required.'..name}, metadata.tooltip or {'exp-required.'..name..'-tooltip'})
|
Gui.centered_label(required, 150, metadata.name or {'exp-required.'..name}, metadata.tooltip or {'exp-required.'..name..'-tooltip'})
|
||||||
Gui.centered_label(settings, 420, tostring(value), metadata.value_tooltip or {'exp-required.'..name..'-value-tooltip'})
|
Gui.centered_label(required, 420, tostring(value), metadata.value_tooltip or {'exp-required.'..name..'-value-tooltip'})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -302,11 +302,10 @@ Gui.element(function(_, parent)
|
|||||||
for name, child in pairs(PlayerData.Settings.children) do
|
for name, child in pairs(PlayerData.Settings.children) do
|
||||||
local metadata = child.metadata
|
local metadata = child.metadata
|
||||||
local value = child:get(player_name)
|
local value = child:get(player_name)
|
||||||
if value ~= nil or metadata.show_always then
|
if metadata.stringify then value = metadata.stringify(value) end
|
||||||
if metadata.stringify then value = metadata.stringify(value) end
|
if value == nil then value = 'None set' end
|
||||||
Gui.centered_label(settings, 150, metadata.name or {'exp-settings.'..name}, metadata.tooltip or {'exp-settings.'..name..'-tooltip'})
|
Gui.centered_label(settings, 150, metadata.name or {'exp-settings.'..name}, metadata.tooltip or {'exp-settings.'..name..'-tooltip'})
|
||||||
Gui.centered_label(settings, 420, tostring(value), metadata.value_tooltip or {'exp-settings.'..name..'-value-tooltip'})
|
Gui.centered_label(settings, 420, tostring(value), metadata.value_tooltip or {'exp-settings.'..name..'-value-tooltip'})
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -324,9 +323,7 @@ Gui.element(function(_, parent)
|
|||||||
Gui.centered_label(statistics, 130, format_number(value or 0), metadata.value_tooltip or {'exp-statistics.'..name..'-tooltip'})
|
Gui.centered_label(statistics, 130, format_number(value or 0), metadata.value_tooltip or {'exp-statistics.'..name..'-tooltip'})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if count > 0 then
|
if count > 0 then for i = 1, count do Gui.centered_label(statistics, 140) end end
|
||||||
for i = 1, count do Gui.centered_label(statistics, 140) end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add the misc area
|
-- Add the misc area
|
||||||
|
|||||||
@@ -8,6 +8,14 @@ local Gui = require 'expcore.gui' --- @dep expcore.gui
|
|||||||
local Event = require 'utils.event' --- @dep utils.event
|
local Event = require 'utils.event' --- @dep utils.event
|
||||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||||
|
|
||||||
|
--- Stores the visible state of server ups
|
||||||
|
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
|
||||||
|
local UsesServerUps = PlayerData.Settings:combine('UsesServerUps')
|
||||||
|
UsesServerUps:set_default(false)
|
||||||
|
UsesServerUps:set_metadata{
|
||||||
|
stringify = function(value) return value and 'Visible' or 'Hidden' end
|
||||||
|
}
|
||||||
|
|
||||||
--- Label to show the server ups
|
--- Label to show the server ups
|
||||||
-- @element server_ups
|
-- @element server_ups
|
||||||
local server_ups =
|
local server_ups =
|
||||||
@@ -19,6 +27,14 @@ Gui.element{
|
|||||||
font = 'default-game'
|
font = 'default-game'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--- Change the visible state when your data loads
|
||||||
|
UsesServerUps:on_load(function(player_name, visible)
|
||||||
|
local player = game.players[player_name]
|
||||||
|
local label = player.gui.screen[server_ups.name]
|
||||||
|
if not global.ext or not global.ext.server_ups then visible = false end
|
||||||
|
label.visible = visible
|
||||||
|
end)
|
||||||
|
|
||||||
--- Toggles if the server ups is visbile
|
--- Toggles if the server ups is visbile
|
||||||
-- @command server-ups
|
-- @command server-ups
|
||||||
Commands.new_command('server-ups', 'Toggle the server ups display')
|
Commands.new_command('server-ups', 'Toggle the server ups display')
|
||||||
@@ -29,6 +45,7 @@ Commands.new_command('server-ups', 'Toggle the server ups display')
|
|||||||
return Commands.error{'expcom-server-ups.no-ext'}
|
return Commands.error{'expcom-server-ups.no-ext'}
|
||||||
end
|
end
|
||||||
label.visible = not label.visible
|
label.visible = not label.visible
|
||||||
|
UsesServerUps:set(player, label.visible)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Set the location of the label
|
-- Set the location of the label
|
||||||
|
|||||||
Reference in New Issue
Block a user