07/03/2020, 10:40 PM
(Última modificación: 08/03/2020, 05:08 PM por andres_1041. Edited 9 times in total.)
System of the best admin.
Créditos:
· Alejandro-. Por ayuda del plugin.
Descripción:
· Es un plugin donde a través de un archivo .ini se colocan los nombres de los mejores admin, este plugin trae un top que es donde se muestra a los mejores admin, valga la redundancia.
Comandos:
· say /adminbest
· say_team /adminbest
Versión de amxx:
· 1.8.3 o superior.
¿Con qué cuenta este plugin?
PLUGIN.
Créditos:
· Alejandro-. Por ayuda del plugin.
Descripción:
· Es un plugin donde a través de un archivo .ini se colocan los nombres de los mejores admin, este plugin trae un top que es donde se muestra a los mejores admin, valga la redundancia.
Comandos:
· say /adminbest
· say_team /adminbest
Versión de amxx:
· 1.8.3 o superior.
¿Con qué cuenta este plugin?
Código:
******************************************************************
*- Cuenta con un archivo .ini
*- Cuenta con un top hecho con html.
*- Cuenta con una opción donde te dice como estar ahí en ese top.
*- v1.0: Lanzamiento del plugin.
******************************************************************
PLUGIN.
Código PHP:
/*---[INCLUDES]---*/
#include <amxmodx>
#include <amxmisc>
/*---[INFORMACIÓN]---*/
#define PLUGIN "The Best Admin."
#define VERSION "1.0"
#define AUTHOR "Andre's <3."
/*---[DEFINE]---*/
#define MAX_PLAYERS_TOP 10
/*---[VARIABLES]---*/
new iDonacionINI[]="Administradores.ini";
new g_Tag[]="^4[^AMXX^4]^1"
/*---[CODE`S]---*/
public plugin_init()
{
register_plugin("The Best Admin.", "1.0", "Andre's <3.");
register_clcmd("say /adminbest", "Administradores");
register_clcmd("say_team /adminbest", "Administradores");
}
public Administradores(id)
{
new menu = menu_create("\w[\rAMXX\w]\y Mejores Admin.", "Hand_Admin");
menu_additem(menu, "Lista de mejores admin.");
menu_additem(menu, "Como estar en este top.");
menu_setprop(menu, MPROP_EXITNAME, "Salir");
menu_display(id, menu);
}
public Hand_Admin(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
switch(item)
{
case 0:Admin(id);
case 1:Admin_Best(id);
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public Admin_Best(id)
{
new menu = menu_create("\w[\rAMXX\w]\y Como estar en este top.", "Hand_Admin");
menu_additem(menu, "Contacta con el OWNER.");
menu_setprop(menu, MPROP_EXITNAME, "Salir");
menu_display(id, menu);
client_print_color(id, id, "%s Para estar en este top contacta con el ^4OWNER^1.", g_Tag)
}
public Admin(id)
{
new g_filename[100];
get_configsdir( g_filename, 299 );
format( g_filename, 299, "%s/%s", g_filename, iDonacionINI );
new szName[50], szAdmin[10];
new f = fopen(g_filename, "rt");
new count = 0;
new iData[250];
new Fecha[30];
new len = 0, motd[2048];
len += formatex(motd[len], sizeof motd-len,
"<body>\
<style>\
@import url('https://fonts.googleapis.com/css?family=Mukta');\
body{color:white;background:#282725;font-family:'Mukta',sans-serif}\
table{border:1px solid #1293d4;font-size:12px;width:100%%}\
th{background:#1293d4}\
td{border:1px solid #1293d4;background:#1293d4}\
</style>\
<h1 align=center>[AMXX] Top Administradores.<h1>\
<table>\
<tr align=center>\
<th width=10%%>Posicion\
<th width=50%%>Nombre\
<th width=20%%>Precio\
<th width=20%%>Fecha");
while(!feof(f))
{
fgets(f, iData, charsmax(iData));
if(!iData[0] || iData[0] == ';' || iData[0] == '/' && iData[1] == '/')
continue;
if(count >= MAX_PLAYERS_TOP )
continue;
parse(iData, szName, 49, szAdmin, 9, Fecha, 29);
if(!szName[0] && !szAdmin[0] && !Fecha[0])
continue;
count++;
len += formatex(motd[len], sizeof motd-len, "<tr align=center>");
len += formatex(motd[len], sizeof motd-len, "<td>%d", count);
len += formatex(motd[len], sizeof motd-len, "<td>%s", szName);
len += formatex(motd[len], sizeof motd-len, "<td><span style=^"color: #1293d4;^">$</span>%s", szAdmin);
len += formatex(motd[len], sizeof motd-len, "<td>%s", Fecha);
}
fclose(f);
len += formatex(motd[len], sizeof motd-len, "</table></body>");
if(count) show_motd( id, motd, "[ AMXX ] Top Administradores.");
else client_print_color( id, id, "%s No hay mejores admin aún.", g_Tag);
}