"" ZP Nuevo Top15
#1
Hola gente del amxmodx :3, yo tengo mi top 15 así
Código PHP:
public Show_Rank_Level(id) {
    if (!
is_user_connected(id)) return PLUGIN_HANDLED;
    
    if (
gTopLevelClear) {
        
Color(id"!g%s!y El top 10 esta vacio."gPrefix)
        return 
PLUGIN_HANDLED;
    }
    
    
Load_Level_Rank(id)
    
    return 
PLUGIN_HANDLED;
}

public 
Load_Level_Rank(id) {   
    if (
gSqlConnect != Empty_Handle) {
        new 
Handle:iQuery SQL_PrepareQuery(gSqlConnect"SELECT Nombre, Nivel, Ammopacks, Resets FROM KZDATA ORDER BY Resets DESC, Nivel DESC, Ammopacks DESC LIMIT 10")

        
SQL_Execute(iQuery)

        if (
SQL_NumResults(iQuery)) {
            
gTopLevelClear false

            
new iPositionszName[32], szLevelszAPsszReset

            
static lenszBuffer[2368]
            
len 0

            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%%> Ammo packs <th width=13%%> Resets")

            while (
SQL_MoreResults(iQuery)) {
                ++
iPosition
            
                SQL_ReadResult
(iQuery0szNamecharsmax(szName))

                
szLevel SQL_ReadResult(iQuery1)
                
szAPs SQL_ReadResult(iQuery2)
                
szReset SQL_ReadResult(iQuery3)

                
len += format(szBuffer[len], charsmax(szBuffer) - len"<tr align=center%s><td> %d <td align=left> %s <td> %d <td> %s <td> %d", ((iPosition%2)==0) ? "" " bgcolor=#2f3030"iPositionszNameszLevelAdd_Point(szAPs), szReset)
            
                
SQL_NextRow(iQuery)
            }

            
show_motd(idszBuffer"Top 10 Niveles")
        }
        else
        
gTopLevelClear true

        SQL_FreeHandle
(iQuery)
    }
}

public 
Sql_cantidad(FailStateHandle:QueryError[], ErrcodeData[], DataSizegCantidad SQL_ReadResult(Query0
Cómo pongo un top15 en menú, ejemplo yo aprete el top15 y me salga los jugadores en una lista, en un menú.. Desde ya gracias pacman
Responder
#2
https://amxmodx-es.com/Thread-TUT-Tutorial-de-menues
fijate como se hace un menu viejo con el sistema viejo estas 3 son las var q tenes q meter
szLevel szAPs szReset
[TUT] Carnage

Fight

"El limite de los backdoors de gente q sabe programar como nostros lo impone nuestra maldad interior y creeme q soy muy malo en el interior"

Anónimo
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)