function getBigPlayer( )
local BigID, LastPlayer = 0
for _, Player in ipairs( getElementsByType( 'player' ) ) do
local PlayerID = getElementData( Player, 'ID' ) or 0
if ( PlayerID and PlayerID > BigID ) then
BigID, LastPlayer = PlayerID, Player
end
end
return LastPlayer
end
-- Test
local aPlayer = getBigPlayer( )
outputChatBox( aPlayer and getPlayerName( aPlayer ) or 'None' )