This was supposed to show a rank, but I'm lost inside the for, does anyone know what the next step is?
PHP Code:
public OnTop15Command(id)
{
new top[TOP_PLAYERS_LENGTH][TopPlayersEnum];
new total = SQLQuery_GetTopPlayers(top, sizeof top);
for (new i = 0; i < total; i++)
{
/*
Available variables:
top[i][tpClanName]
top[i][tpClanTag]
top[i][tpName]
top[i][tpAuthid]
top[i][tpIP]
top[i][tpXP]
top[i][tpKills]
top[i][tpDeaths]
top[i][tpCaptures]
top[i][tpDefenses]
top[i][tpPosition]
*/
console_print(id, "%dº | %s | %d/%d", top[i][tpPosition], top[i][tpName], top[i][tpKills], top[i][tpDeaths]);
}
log("OnTop15Command(id: %d) total: %d", id, total);
}
public OnTopClansCommand(id)
{
new top[TOP_CLANS_LENGTH][TopClansEnum];
new total = SQLQuery_GetTopClans(top, sizeof top);
for (new i = 0; i < total; i++)
{
/*
Available variables:
top[i][tcName]
top[i][tcTag]
top[i][tcMembersCount]
top[i][tcTotalXP]
top[i][tcTotalKills]
top[i][tcTotalDeaths]
top[i][tcTotalCaptures]
top[i][tcTotalDefenses]
top[i][tcPosition]
*/
console_print(id, "%dº | TAG: %s | CLAN: %s | XP: %d | MEMBROS: %d", top[i][tcPosition], top[i][tcName], top[i][tcTag], top[i][tcTotalXP], top[i][tcMembersCount]);
}
log("OnTopClansCommand(id: %d) total: %d", id, total);
}