mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
.
This commit is contained in:
@@ -57,6 +57,10 @@ Commands.new("server-ups", { "server-ups.description" })
|
|||||||
local function set_location(event)
|
local function set_location(event)
|
||||||
local player = game.players[event.player_index]
|
local player = game.players[event.player_index]
|
||||||
local label = player.gui.screen[server_ups.name]
|
local label = player.gui.screen[server_ups.name]
|
||||||
|
if not label then
|
||||||
|
label = server_ups(player.gui.screen)
|
||||||
|
label.visible = UsesServerUps:get(player)
|
||||||
|
end
|
||||||
local res = player.display_resolution
|
local res = player.display_resolution
|
||||||
local uis = player.display_scale
|
local uis = player.display_scale
|
||||||
-- below ups and clock
|
-- below ups and clock
|
||||||
@@ -65,12 +69,7 @@ local function set_location(event)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Draw the label when the player joins
|
-- Draw the label when the player joins
|
||||||
Event.add(defines.events.on_player_created, function(event)
|
Event.add(defines.events.on_player_created, set_location)
|
||||||
local player = game.players[event.player_index]
|
|
||||||
local label = server_ups(player.gui.screen)
|
|
||||||
label.visible = false
|
|
||||||
set_location(event)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Update the caption for all online players
|
-- Update the caption for all online players
|
||||||
-- percentage of game speed
|
-- percentage of game speed
|
||||||
|
|||||||
Reference in New Issue
Block a user