Raised This Month: $51 Target: $400
 12% 

[GUIA] Top15 Por Level y Reset ( sin guardado )


  
 
 
Thread Tools Display Modes
Author Message
TimooCS
Veteran Member
Join Date: Dec 2012
Location: Argentina
Old 07-07-2013 , 23:19   [GUIA] Top15 Por Level y Reset ( sin guardado )
#1

Descripcion:
Bueno vengo a hacer esta guia, enrealidad C&P pero bue
Tiempo:
ni 5 mins

Empezemos
PHP Code:
#include < amxmodx >
#include < amxmisc >

#define PLUGIN "Top15"
#define VERSION "1.0"
#define AUTHOR "TimooCS"

public plugin_init() {
   
register_plugin(PLUGINVERSIONAUTHOR)
   
register_clcmd("say /top15""top15")
}

public 
top15(id) {
   new 
icountPosicion[10];
   static 
sort[33][3], maxPlayersg_menu[100];

   if(!
maxPlayersmaxPlayers get_maxplayers();

   new 
menu menu_create("\yTop15""top155");

   for(
i=1;i<=maxPlayers;i++) {
     
sort[count][0] = i;
     
sort[count][1] = g_level[i];
     
sort[count][2] = g_reset[i];
     
count++;
   }
   
SortCustom2D(sortcount"stats_custom_compare");
   
   static 
name[32];
   for(new 
016a++) {
        
get_user_name(sort[a][0], name32);
        
formatex(g_menucharsmax(g_menu), "%d. \y%s \y%d Level %d Reset"1namesort[a][1], sort[a][2]);
        
num_to_str(aPosicioncharsmax(Posicion));
        
menu_additem(menug_menuPosicion);
   }

   
menu_setprop(menuMPROP_NEXTNAME"Pagina Siguiente");
   
menu_setprop(menuMPROP_BACKNAME"Pagina Anterior");
   
menu_setprop(menuMPROP_EXITNAME"Salir");

   
menu_display(idmenu0);
   return 
PLUGIN_HANDLED
}

public 
top155(idmenuitem) {
    if(
item == MENU_EXIT) {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }    
    switch(
item) {
        case 
0..15top15(id);
    }

    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}  

public 
stats_custom_compare(elem1[],elem2[]) {
    if(
elem1[1] > elem2[1]) return -1;
    else if(
elem1[1] < elem2[1]) return 1;
        
    return 
0;

Bueno.. Me guié de la forma del motd ;3 , Nv. No tiene guardado, no creo que necesite e.e, si ven algun bug o alguna sugerencia no duden en postearla , a mi me funciono de 10.

Aviso: g_reset[i] y g_level[i] , pueden ser cualquier variable..
__________________

Last edited by TimooCS; 07-10-2013 at 15:50.
TimooCS is offline
Send a message via MSN to TimooCS Send a message via Skype™ to TimooCS
AlexCrow2013
Junior Member
Join Date: May 2013
Old 07-07-2013 , 23:36   Re: [GUIA] Top15 Por Level y Reset ( sin guardado )
#2

PHP Code:
        case 1..100top155(id); 
te confundiste aca timooo..

PHP Code:
        case 1..100top15(id); 

Lo demas anda genial . gracias

Last edited by AlexCrow2013; 07-07-2013 at 23:46.
AlexCrow2013 is offline
MexPower
Veteran Member
Join Date: Nov 2012
Old 07-07-2013 , 23:47   Re: [GUIA] Top15 Por Level y Reset ( sin guardado )
#3

Cabe aclarar que es solo de los jugadores conectados, no de todo el servidor.

Timo xd es un top15 y pusiste 10 we aca mira
PHP Code:
for(new 010a++) 
__________________
Allied Modders En Español
MexPower is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 07-08-2013 , 03:57   Re: [GUIA] Top15 Por Level y Reset ( sin guardado )
#4

Quote:
Originally Posted by MexPower View Post
Cabe aclarar que es solo de los jugadores conectados, no de todo el servidor.

Timo xd es un top15 y pusiste 10 we aca mira
PHP Code:
for(new 010a++) 
debería poner 16
baneado is offline
TimooCS
Veteran Member
Join Date: Dec 2012
Location: Argentina
Old 07-08-2013 , 05:41   Re: [GUIA] Top15 Por Level y Reset ( sin guardado )
#5

sí, son de los jugadores online.. pero despues ve si le pongo guardado.. ahi arregle , gracias n.n

pueden ponerlo asi -->
PHP Code:
for(new 010000a++) 
e.e
__________________

Last edited by TimooCS; 07-08-2013 at 05:43.
TimooCS is offline
Send a message via MSN to TimooCS Send a message via Skype™ to TimooCS
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 07-08-2013 , 06:42   Re: [GUIA] Top15 Por Level y Reset ( sin guardado )
#6

Quote:
Originally Posted by TimooCS View Post
sí, son de los jugadores online.. pero despues ve si le pongo guardado.. ahi arregle , gracias n.n

pueden ponerlo asi -->
PHP Code:
for(new 010000a++) 
e.e
nunca va a haber 10000 jugadores conectados...
baneado is offline
TimooCS
Veteran Member
Join Date: Dec 2012
Location: Argentina
Old 07-08-2013 , 09:56   Re: [GUIA] Top15 Por Level y Reset ( sin guardado )
#7

Quote:
Originally Posted by baneado View Post
nunca va a haber 10000 jugadores conectados...
si lo guardas .___., LOL
__________________

Last edited by TimooCS; 07-08-2013 at 09:56.
TimooCS is offline
Send a message via MSN to TimooCS Send a message via Skype™ to TimooCS
MexPower
Veteran Member
Join Date: Nov 2012
Old 07-08-2013 , 11:13   Re: [GUIA] Top15 Por Level y Reset ( sin guardado )
#8

Nononono, no se puede timo, ese tutorial solo es funcionable con los jugadores conectados, en el loop si el jugador no esta conectado como obtendras su nombre y sus datos(level,resets,blabla)
En Sql es facil hacerlo pero en vault voy a investigar
__________________
Allied Modders En Español
MexPower is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-08-2013 , 11:55   Re: [GUIA] Top15 Por Level y Reset ( sin guardado )
#9

Y la explicacion ?
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
MexPower
Veteran Member
Join Date: Nov 2012
Old 07-08-2013 , 12:01   Re: [GUIA] Top15 Por Level y Reset ( sin guardado )
#10

https://forums.alliedmods.net/showpo...11&postcount=6

Encontre eso pero solo funcionaria en el nvault
__________________
Allied Modders En Español
MexPower is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode