Code:
public show_top15up(id)
{
new i, count;
static sort[33][2], maxPlayers;
if(!maxPlayers) maxPlayers = get_maxplayers();
for(i=1;i<=maxPlayers;i++)
{
sort[count][0] = i;
sort[count][1] = PlayerMoney[i];
count++;
}
new MotdChars[1024], iLen
iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, STYLE)
iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, "<body><h2>Players Info</h2> <table width=100%% border=0 align=center cellpadding=0 cellspacing=1>")
iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, "<body><tr><th>#<th>Name<th>Money</tr>" )
new b = clamp(count,0,15)
new name[32], player
for(new a=0;a<b; a++) {
player = sort[a][0]
get_user_name(player, name, 31)
iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen,"<tr><td> %d <td> %s <td> %d </tr>", a+1, name, sort[a][1])
}
iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, "</table>" )
show_motd(id, MotdChars, "Push The Button Top 15")
return PLUGIN_CONTINUE
}