this is the code that needs to be fixed. This isn't my code, just edited the accuracy part into the level part but it doesn't work. get_player_level() is made like i posted before in the test version. The only difference is that i don't set iLevel[33] = 5, iLevel[33] changes all the time when players level up killing people.
PHP Code:
format_top15(sBuffer[MAX_BUFFER_LENGTH + 1])
{
new iMax = get_statsnum()
new izStats[8], izBody[8], istate[4]//, SzName[32]
new iLen = 0
//get_user_name(id, szName, 31);
if (iMax > 10)
iMax = 10
new lNick[20], lKills[20], lDeaths[20], lHs[20], lAcc[20], lLvl[20]
format(lNick, 19, "Nick")
format(lKills, 19, "Kills")
format(lDeaths, 19, "Deaths")
format(lHs, 19, "Headshots")
format(lLvl,charsmax(lLvl), "Level")
//format(lAcc, 19, "Accuracy")
//format(knifeGetLevel(id), 19, "Level")
//ucfirst(lAcc)
iLen = format( sBuffer, MAX_BUFFER_LENGTH,
"<head><META http-equiv=Content-Type content='text/html ;charset=UTF-8'></head><style>body{background:#191818;background-image: url(^"http://i63.tinypic.com/2v0g7br.jpg^");margin:5pt;padding:2pt;font-family:Tahoma;color:#eaeaea}.A{background-color:#262626;opacity:0.6;filter:alpha(opacity=60);}.B{background-color:#0b0b0b;opacity:0.6;filter:alpha(opacity=60);}td{font-size:15px}</style><center><table width=100%% background=^"^">" )
iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
"<tr><td><br/> <td></tr><tr><td><br/> <td></tr><tr><td><br/> <td></tr><tr><td><br/> <td></tr><tr><td><br/> <b><td></tr><tr><td>%s<td>%s<td>%s<td>%s<td>%s<td>%s</b>",
"#", lNick, lKills, lDeaths, lHs, lLvl ) //knifeGetLevel(id) )
new players[32], inum, id
get_players(players, inum)
for(new i; i < inum; i++) {
id = players[i]
}
for (new i = 0; i < iMax && MAX_BUFFER_LENGTH - iLen > 0; i++)
{
if (equal(istate,"A")) copy(istate,3,"B")
else copy(istate,3,"A")
get_stats(i, izStats, izBody, t_sName, MAX_NAME_LENGTH,sAuthid,MAX_NAME_LENGTH)
while( contain ( t_sName, "<" ) != -1 )
replace( t_sName,MAX_BUFFER_LENGTH + 1,"<", "[" )
while( contain ( t_sName, ">" ) != -1 )
replace( t_sName,MAX_BUFFER_LENGTH + 1,">", "]" )
if(get_pcvar_num(authidgoster) == 1){
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "<tr class=%s><td>%d<td>%s (%s)<td>%d<td>%d<td>%d<td>%d%%",istate, i + 1, t_sName, sAuthid, izStats[STATS_KILLS],
izStats[STATS_DEATHS], izStats[STATS_HS], get_player_level(id))
}
else{
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "<tr class=%s><td>%d<td>%s <td>%d<td>%d<td>%d<td>%d%%",istate, i + 1, t_sName, izStats[STATS_KILLS],
izStats[STATS_DEATHS], izStats[STATS_HS], get_player_level(id))
}
}
copy(sBuffer[iLen],MAX_BUFFER_LENGTH - iLen,"</table></center>")
}