Show top3 players in server info with a stylish way. Approved by Gaios
Download
74 kb, 412 Downloads
Lua Scripts
TOP3 in Server Info
Show top3 players in server info with a stylish way.
Download
1

stats(steam,"rank")to this
steamstats(steam,"rank").
stats
steamstats<text size = "15" color="#BABABA" align="left"> <!-- FIRST PLACE --> To be updated </text>
--- Undefined:
-- id // Player ID
-- position // Player position on the board
-- playerLogin // Player login ID, U.S.G.N. or STEAM
local filePath	= 'sys/serverinfo.txt'
local file, _	= io.open(filePath, 'r')
if not file then
	return
end
local output	= { }
for line in file:lines() do
	if position == 1 and line:find('FIRST PLACE')
		or position == 2 and line:find('SECOND PLACE')
		or position == 3 and line:find('THIRD PLACE') then
		output[#output+1] = player(id, 'name') .. '#' .. playerLogin
	else
		output[#output+1] = line
	end
end
1
