I got a variable:
score = {}
score[id] = 1
etc.
How to discover the biggest value of them, get the player's id who has this value and of course the value itself?
------------------------- -- max = { value, id } ------------------------- max = {0} for i,v in ipairs(score) do 	if(v>max[1]) then max={v,i} end end
------------------------- -- max = { value, id } ------------------------- addhook("endround","findmax") function findmax() maxt = {0} maxct = {} for i,v in ipairs(player(0,"team1")) do 	if(player(v,"score")>maxt[1]) then maxt={player(v,"score"),v} end end for i,v in ipairs(player(0,"team1")) do 	if(player(v,"score")>maxct[1]) then maxct={player(v,"score"),v} end end end
function table.max(tbl) 	local tbl2 = {} 	for i,v in pairs(tbl) do 		tbl2[v] = i 	end 	return table.maxn(tbl2) end
------------------------- -- max = { value, id } -------------------------