mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 13:01:39 +09:00
Made check for ext
This commit is contained in:
@@ -74,3 +74,5 @@ home-set=Your home point has been set to x: __1__ y: __2__
|
|||||||
return-set=Your return point has been set to x: __1__ y: __2__
|
return-set=Your return point has been set to x: __1__ y: __2__
|
||||||
home-get=Your home point is at x: __1__ y: __2__
|
home-get=Your home point is at x: __1__ y: __2__
|
||||||
|
|
||||||
|
[expcom-server-ups]
|
||||||
|
no-ext=No external source was found, cannot display server ups.
|
||||||
@@ -25,6 +25,9 @@ Commands.new_command('server-ups','Toggle the server ups display')
|
|||||||
:add_alias('sups','ups')
|
:add_alias('sups','ups')
|
||||||
:register(function(player)
|
:register(function(player)
|
||||||
local label = player.gui.screen[sverer_ups.name]
|
local label = player.gui.screen[sverer_ups.name]
|
||||||
|
if not global.ext or not global.ext.server_ups then
|
||||||
|
return Commands.error{'expcom-server-ups.no-ext'}
|
||||||
|
end
|
||||||
label.visible = not label.visible
|
label.visible = not label.visible
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -48,12 +51,11 @@ end)
|
|||||||
|
|
||||||
-- Update the caption for all online players
|
-- Update the caption for all online players
|
||||||
Event.on_nth_tick(60,function()
|
Event.on_nth_tick(60,function()
|
||||||
local caption = 'Server UPS = 60.0'
|
|
||||||
if global.ext and global.ext.server_ups then
|
if global.ext and global.ext.server_ups then
|
||||||
caption = 'Server UPS = '..global.ext.server_ups
|
local caption = 'Server UPS = '..global.ext.server_ups
|
||||||
end
|
for _,player in pairs(game.connected_players) do
|
||||||
for _,player in pairs(game.connected_players) do
|
player.gui.screen[sverer_ups.name].caption = caption
|
||||||
player.gui.screen[sverer_ups.name].caption = caption
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user