Logan Gartner
e437bbdc57
New module system Added help menu Added stats command Added built in HUD Changed colors to make more sense Added loaded net message Improved chat check for commands Shortened color names
28 lines
1.2 KiB
Text
28 lines
1.2 KiB
Text
--@name
|
|
--@author
|
|
--@server
|
|
|
|
do
|
|
function getServerInfo()
|
|
print(core.color_logo, "[L-SFT] ", core.color_text, "-------------------------")
|
|
print(core.color_logo, "[L-SFT] ", core.color_info, "Name: ", core.color_text, game.getHostname())
|
|
print(core.color_logo, "[L-SFT] ", core.color_info, "Players: ", core.color_text, #find.allPlayers().."/"..game.getMaxPlayers())
|
|
print(core.color_logo, "[L-SFT] ", core.color_info, "Map: ", core.color_text, game.getMap())
|
|
print(core.color_logo, "[L-SFT] ", core.color_info, "Tickrate: ", core.color_text, math.round(1/game.getTickInterval()).." t/s")
|
|
print(core.color_logo, "[L-SFT] ", core.color_info, "Is Dedicated: ", core.color_text, game.isDedicated())
|
|
print(core.color_logo, "[L-SFT] ", core.color_text, "-------------------------")
|
|
end
|
|
|
|
|
|
core.modules.serverinfo = {
|
|
version = 1,
|
|
desc = "Provides basic server info.",
|
|
commands = {
|
|
serverinfo = {
|
|
usage = "serverinfo",
|
|
desc = "Prints basic server information to the chat.",
|
|
func = getServerInfo,
|
|
},
|
|
},
|
|
}
|
|
end
|