08/09/2022, 08:30 PM
(Última modificación: 08/09/2022, 08:31 PM por Mariano Gyt. Edited 1 time in total.)
Buenas, tengo un inconveniente con el motd, en si anda todo bien, lo unico es que "Rangos" lo veo a todos... los que aparecen en el motd con mi rango en ves del rango de cada uno.. dejo el codigo
Muchas gracias por su ayuda!
Código PHP:
public Load_Level_Rank(id)
{
if(g_sql_connection != Empty_Handle)
{
new Handle:iQuery = SQL_PrepareQuery(g_sql_connection, "SELECT name, Nivel, Experiencia, Rangos FROM '%s' ORDER BY Nivel DESC, Experiencia DESC LIMIT 10;", SQL_TABLE);
SQL_Execute(iQuery)
if(SQL_NumResults(iQuery))
{
iTopLevelClear = 0
new iPosition = 0, szName[32], szLevel, szExp, len = 0, szBuffer[3000];
len = format(szBuffer[len], charsmax(szBuffer) - len, "<STYLE>body{background:#232323;color:#cfcbc2;font-family:sans-serif}table{width:100%%;line-height:160%%;font-size:12px}.q{border:1px solid #4a4945}.b{background:#2a2a2a}</STYLE><table cellpadding=2 cellspacing=0 border=0>")
len += format(szBuffer[len], charsmax(szBuffer) - len, "<tr align=center bgcolor=#52697B><th width=5%%> # <th width=22%% align=left> Nick <th width=10%%> Nivel <th width=13%%> Experiencia <th width=13%%> Rango")
while(SQL_MoreResults(iQuery))
{
++iPosition;
SQL_ReadResult(iQuery, 0, szName, charsmax(szName));
szLevel = SQL_ReadResult(iQuery, 1);
szExp = SQL_ReadResult(iQuery, 2);
len += format(szBuffer[len], charsmax(szBuffer) - len, "<tr align=center%s><td> %d <td align=left> %s <td> %d <td> %d <td> %s", ((iPosition%2)==0) ? "" : " bgcolor=#2f3030", iPosition, szName, szLevel, szExp, rangos[Rango[id]]);
SQL_NextRow(iQuery);
}
show_motd(id, szBuffer, "Top 10 Niveles")
SQL_FreeHandle(iQuery)
}
else
{
iTopLevelClear = 1
SQL_FreeHandle(iQuery)
}
}
}
Muchas gracias por su ayuda!