$$loop row as totaltype index as totaltypeindex select * from %%table%%$$ $$openfile %%table%%_%%totaltype.id%%.html$$ $$messagecentrekey="Top%%table%%%%totaltype.id%%"$$ $$include menu.html$$ $$if (totaltype.image !EQUALS "")$$$$endif$$
$$title$$:$$totaltype.realname$$

$$totalkills=0$$ $$loop row as playertotal index as playertotalindex select sum(kills) as totalkills from view_killtotal%%suffix%% where itemindex='%%totaltype.idx%%'$$ $$totalkills=playertotal.totalkills$$ $$endloop$$ $$firstrow="Y"$$$$loop row as playertotal index as playertotalindex select *,coalesce((cast((kills * 100.0 ) as float)/%%totalkills%%.0),0.0) as percentage from view_killtotal%%suffix%% where itemindex='%%totaltype.idx%%' order by kills desc limit %%MAXTOTALLISTPLAYERS%%$$ $$if (firstrow EQUALS "Y")$$ $$firstrow="N"$$ $$MessageCentre(messagecentrekey,playertotal.name,playertotal.kills)$$ $$endif$$ $$tablename="playerdataavatars"$$$$playerdataplayerindex=playertotal.playerindex$$$$include playerprofilecomponent.html$$ $$endloop playertotal$$
# Name Kills Deaths Suicides Team Kills Kill %
$$playertotalindex$$$$colouredtext2html(playertotal.name)$$$$if (playerdataavatars !EQUALS "")$$
$$endif$$
$$playertotal.kills$$ $$playertotal.deaths$$ $$playertotal.suicides$$ $$playertotal.teamkills$$ $$formatfloat("%.2f",playertotal.percentage)$$%
$$closefile$$ $$endloop totaltype$$