Mensajes: 173
Temas: 49
Registro en: Aug 2017
Reputación:
0
Hola quisiera saber si hay un plugin de un menu que abajo del titulo salgan las horas jugadas ejemplo:
Código PHP: formatex(title, 63, "\yMenu Principal^nTienes %i dias, %i horas, %i minutos, %i segundos jugadas", Days, Hours, Minutes, Seconds)
De antemano porfa
Ze_Jurassic_World_Z [52%]
Ze_Jumping_Area [37%]
(04/02/2019, 05:15 PM)kikizon2 escribió: Me voy por un tiempo y cuando regreso veo esto...
Mensajes: 43
Temas: 2
Registro en: Sep 2019
01/10/2019, 07:16 PM
(Última modificación: 01/10/2019, 07:40 PM por Cris.-. Edited 2 times in total.)
Fijate si te sirve
FIX: Ahí puse para que cuente los días.
Código PHP: #include <amxmodx> #include <amxmisc>
#pragma semicolon 1
enum _:SYSTIME_STRUCT { SYSTIME_DAYS, SYSTIME_HOURS, SYSTIME_MINUTES, SYSTIME_SECONDS, SYSTIME_CHECK };
new g_systime[33][SYSTIME_STRUCT];
public plugin_init() { register_plugin("Time", "1.0", "Cristian'"); register_clcmd("say /time", "clcmd_time"); register_menu("Handled Clcmd Time", (1<<9), "handled_clcmd_time"); }
public client_putinserver(id) g_systime[id][SYSTIME_CHECK] = get_systime();
public clcmd_time(id) { static menu[128], len; len = 0; g_systime[id][SYSTIME_SECONDS] = (get_systime() - g_systime[id][SYSTIME_CHECK]); g_systime[id][SYSTIME_DAYS] = ((g_systime[id][SYSTIME_SECONDS] / 86400) % 7); g_systime[id][SYSTIME_HOURS] = ((g_systime[id][SYSTIME_SECONDS] / 3600) % 24); g_systime[id][SYSTIME_MINUTES] = ((g_systime[id][SYSTIME_SECONDS] / 60) % 60); len += formatex(menu[len], charsmax(menu) - len, "\yTu tiempo es de \w%d día(s) \r- \w%d horas(s) \r- \w%d minuto(s) \r- \w%d segundo(s)^n^n\r0. \wSalir", g_systime[id][SYSTIME_DAYS], g_systime[id][SYSTIME_HOURS], g_systime[id][SYSTIME_MINUTES], (g_systime[id][SYSTIME_SECONDS] % 60)); show_menu(id, (1<<9), menu, -1, "Handled Clcmd Time"); return PLUGIN_HANDLED; }
public handled_clcmd_time(id, item) { if (!item) return PLUGIN_HANDLED; return PLUGIN_HANDLED; }
Mensajes: 173
Temas: 49
Registro en: Aug 2017
Reputación:
0
01/10/2019, 08:07 PM
(Última modificación: 01/10/2019, 08:12 PM por LIL8ZINN.)
(01/10/2019, 07:16 PM)Cris.- escribió: Fijate si te sirve
FIX: Ahí puse para que cuente los días.
Código PHP: #include <amxmodx> #include <amxmisc>
#pragma semicolon 1
enum _:SYSTIME_STRUCT { SYSTIME_DAYS, SYSTIME_HOURS, SYSTIME_MINUTES, SYSTIME_SECONDS, SYSTIME_CHECK };
new g_systime[33][SYSTIME_STRUCT];
public plugin_init() { register_plugin("Time", "1.0", "Cristian'"); register_clcmd("say /time", "clcmd_time"); register_menu("Handled Clcmd Time", (1<<9), "handled_clcmd_time"); }
public client_putinserver(id) g_systime[id][SYSTIME_CHECK] = get_systime();
public clcmd_time(id) { static menu[128], len; len = 0; g_systime[id][SYSTIME_SECONDS] = (get_systime() - g_systime[id][SYSTIME_CHECK]); g_systime[id][SYSTIME_DAYS] = ((g_systime[id][SYSTIME_SECONDS] / 86400) % 7); g_systime[id][SYSTIME_HOURS] = ((g_systime[id][SYSTIME_SECONDS] / 3600) % 24); g_systime[id][SYSTIME_MINUTES] = ((g_systime[id][SYSTIME_SECONDS] / 60) % 60); len += formatex(menu[len], charsmax(menu) - len, "\yTu tiempo es de \w%d día(s) \r- \w%d horas(s) \r- \w%d minuto(s) \r- \w%d segundo(s)^n^n\r0. \wSalir", g_systime[id][SYSTIME_DAYS], g_systime[id][SYSTIME_HOURS], g_systime[id][SYSTIME_MINUTES], (g_systime[id][SYSTIME_SECONDS] % 60)); show_menu(id, (1<<9), menu, -1, "Handled Clcmd Time"); return PLUGIN_HANDLED; }
public handled_clcmd_time(id, item) { if (!item) return PLUGIN_HANDLED; return PLUGIN_HANDLED; }
Me sirve pero yo quiero es hacer un menu que lleve
Ya que el
No lo se usar
Por decir este es mi menu
Código PHP: #include <amxmodx> #include <amxmisc> #include <jctf>
new const Prefijo2[] = ""
public plugin_init() { register_plugin("xdxd", "1.0", "xdxd"); register_clcmd( "nightvision", "cmdMenu" ); } public cmdMenu(id) { new title[64]; formatex(title, 63, "Menu Principal^nDias: %d, Horas: %d, Minutos: %d y Segundos: %d", Dias, Horas, Minutos, Segudos) new gMenu = menu_create(title, "handlerMenu")
new adrenalina[32] new adrenalina2[32]
format(adrenalina2, charsmax(adrenalina2), "\yAdrenaline \w(%d \y/ \w100)", jctf_get_adrenaline(id)) format(adrenalina, charsmax(adrenalina), "\yAdrenaline \w(\r%d \y/ \w100)", jctf_get_adrenaline(id))
menu_additem(gMenu, ( is_user_admin(id) ? "\y[\w Menu ADMIN \y]" : "\wPanel \d[Admin] \y]"), "1"); menu_additem(gMenu, "\y(\w Top Mejores Jugadores \y)", "2") menu_additem(gMenu, ( jctf_get_adrenaline(id)<100 ? adrenalina : adrenalina2), "3"); menu_additem(gMenu, "\y(\w Armas Especiales \y)", "3") menu_additem(gMenu, "\y(\r Resetear Score \y)", "4") menu_additem(gMenu, "\y[\w CsApure - Informacion \y]", "5")
menu_display(id, gMenu, 0) show_menu(id, (1<<9), menu, -1, "handlerMenu"); } public handlerMenu(id, menu, item) { if ( item == MENU_EXIT ) { menu_destroy(menu) return PLUGIN_HANDLED; } switch(item) { case 0: { if(!is_user_admin(id)) { client_print(id, print_center, "**No tienes acceso a este comando**") } else if(is_user_admin(id)) { client_cmd(id, "amxmodmenu") } } case 1: { client_cmd(id, "say top") } case 2: { client_cmd(id, "adrenaline") } case 3: { client_cmd(id, "say /Apespecial") } case 4: { client_cmd(id, "say /rs") } case 5: { client_cmd(id, "say /AP") } case 6: { client_cmd(id, "say /time") } } return PLUGIN_HANDLED; }
Yo quiero adaptar eso a mi menu
Ze_Jurassic_World_Z [52%]
Ze_Jumping_Area [37%]
(04/02/2019, 05:15 PM)kikizon2 escribió: Me voy por un tiempo y cuando regreso veo esto...
Mensajes: 43
Temas: 2
Registro en: Sep 2019
Fijate.
Código PHP: #include <amxmodx> #include <amxmisc> #include <jctf>
enum _:SYSTIME_STRUCT { SYSTIME_DAYS, SYSTIME_HOURS, SYSTIME_MINUTES, SYSTIME_SECONDS, SYSTIME_CHECK };
new g_systime[33][SYSTIME_STRUCT];
public plugin_init() { register_plugin("Time", "1.0", "Cristian'"); register_clcmd( "nightvision", "cmdMenu" ); }
public client_putinserver(id) g_systime[id][SYSTIME_CHECK] = get_systime();
public cmdMenu(id) { new title[64];
g_systime[id][SYSTIME_SECONDS] = (get_systime() - g_systime[id][SYSTIME_CHECK]); g_systime[id][SYSTIME_DAYS] = ((g_systime[id][SYSTIME_SECONDS] / 86400) % 7); g_systime[id][SYSTIME_HOURS] = ((g_systime[id][SYSTIME_SECONDS] / 3600) % 24); g_systime[id][SYSTIME_MINUTES] = ((g_systime[id][SYSTIME_SECONDS] / 60) % 60);
formatex(title, 63, "Menu Principal^nDia(s): %d, Hora(s): %d, Minuto(s): %d y Segundo(s): %d", g_systime[id][SYSTIME_DAYS], g_systime[id][SYSTIME_HOURS], g_systime[id][SYSTIME_MINUTES], (g_systime[id][SYSTIME_SECONDS] % 60)); new gMenu = menu_create(title, "handlerMenu")
new adrenalina[32] new adrenalina2[32]
format(adrenalina2, charsmax(adrenalina2), "\yAdrenaline \w(%d \y/ \w100)", jctf_get_adrenaline(id)) format(adrenalina, charsmax(adrenalina), "\yAdrenaline \w(\r%d \y/ \w100)", jctf_get_adrenaline(id))
menu_additem(gMenu, ( is_user_admin(id) ? "\y[\w Menu ADMIN \y]" : "\wPanel \d[Admin] \y]"), "1"); menu_additem(gMenu, "\y(\w Top Mejores Jugadores \y)", "2") menu_additem(gMenu, ( jctf_get_adrenaline(id)<100 ? adrenalina : adrenalina2), "3"); menu_additem(gMenu, "\y(\w Armas Especiales \y)", "3") menu_additem(gMenu, "\y(\r Resetear Score \y)", "4") menu_additem(gMenu, "\y[\w CsApure - Informacion \y]", "5")
menu_display(id, gMenu, 0) show_menu(id, (1<<9), menu, -1, "handlerMenu"); } public handlerMenu(id, menu, item) { if ( item == MENU_EXIT ) { menu_destroy(menu) return PLUGIN_HANDLED; } switch(item) { case 0: { if(!is_user_admin(id)) { client_print(id, print_center, "**No tienes acceso a este comando**") } else if(is_user_admin(id)) { client_cmd(id, "amxmodmenu") } } case 1: { client_cmd(id, "say top") } case 2: { client_cmd(id, "adrenaline") } case 3: { client_cmd(id, "say /Apespecial") } case 4: { client_cmd(id, "say /rs") } case 5: { client_cmd(id, "say /AP") } case 6: { client_cmd(id, "say /time") } } return PLUGIN_HANDLED; }
Mensajes: 173
Temas: 49
Registro en: Aug 2017
Reputación:
0
(01/10/2019, 08:23 PM)Cris.- escribió: Fijate.
Código PHP: #include <amxmodx> #include <amxmisc> #include <jctf>
enum _:SYSTIME_STRUCT { SYSTIME_DAYS, SYSTIME_HOURS, SYSTIME_MINUTES, SYSTIME_SECONDS, SYSTIME_CHECK };
new g_systime[33][SYSTIME_STRUCT];
public plugin_init() { register_plugin("Time", "1.0", "Cristian'"); register_clcmd( "nightvision", "cmdMenu" ); }
public client_putinserver(id) g_systime[id][SYSTIME_CHECK] = get_systime();
public cmdMenu(id) { new title[64];
g_systime[id][SYSTIME_SECONDS] = (get_systime() - g_systime[id][SYSTIME_CHECK]); g_systime[id][SYSTIME_DAYS] = ((g_systime[id][SYSTIME_SECONDS] / 86400) % 7); g_systime[id][SYSTIME_HOURS] = ((g_systime[id][SYSTIME_SECONDS] / 3600) % 24); g_systime[id][SYSTIME_MINUTES] = ((g_systime[id][SYSTIME_SECONDS] / 60) % 60);
formatex(title, 63, "Menu Principal^nDia(s): %d, Hora(s): %d, Minuto(s): %d y Segundo(s): %d", g_systime[id][SYSTIME_DAYS], g_systime[id][SYSTIME_HOURS], g_systime[id][SYSTIME_MINUTES], (g_systime[id][SYSTIME_SECONDS] % 60)); new gMenu = menu_create(title, "handlerMenu")
new adrenalina[32] new adrenalina2[32]
format(adrenalina2, charsmax(adrenalina2), "\yAdrenaline \w(%d \y/ \w100)", jctf_get_adrenaline(id)) format(adrenalina, charsmax(adrenalina), "\yAdrenaline \w(\r%d \y/ \w100)", jctf_get_adrenaline(id))
menu_additem(gMenu, ( is_user_admin(id) ? "\y[\w Menu ADMIN \y]" : "\wPanel \d[Admin] \y]"), "1"); menu_additem(gMenu, "\y(\w Top Mejores Jugadores \y)", "2") menu_additem(gMenu, ( jctf_get_adrenaline(id)<100 ? adrenalina : adrenalina2), "3"); menu_additem(gMenu, "\y(\w Armas Especiales \y)", "3") menu_additem(gMenu, "\y(\r Resetear Score \y)", "4") menu_additem(gMenu, "\y[\w CsApure - Informacion \y]", "5")
menu_display(id, gMenu, 0) show_menu(id, (1<<9), menu, -1, "handlerMenu"); } public handlerMenu(id, menu, item) { if ( item == MENU_EXIT ) { menu_destroy(menu) return PLUGIN_HANDLED; } switch(item) { case 0: { if(!is_user_admin(id)) { client_print(id, print_center, "**No tienes acceso a este comando**") } else if(is_user_admin(id)) { client_cmd(id, "amxmodmenu") } } case 1: { client_cmd(id, "say top") } case 2: { client_cmd(id, "adrenaline") } case 3: { client_cmd(id, "say /Apespecial") } case 4: { client_cmd(id, "say /rs") } case 5: { client_cmd(id, "say /AP") } case 6: { client_cmd(id, "say /time") } } return PLUGIN_HANDLED; }
Gracias amigo me sirvio espero aprender mas sobre PAWN pronto
Ze_Jurassic_World_Z [52%]
Ze_Jumping_Area [37%]
(04/02/2019, 05:15 PM)kikizon2 escribió: Me voy por un tiempo y cuando regreso veo esto...
Mensajes: 173
Temas: 49
Registro en: Aug 2017
Reputación:
0
Amigo tengo un problema hace unos minutos me compilaba bien ahora trato de compilar y me sale este error
Código PHP: Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Error: Undefined symbol "menu" on line 53
1 Error. Could not locate output file C:\Users\Home\Desktop\DLX-MenuApure.amx (compile failed).
Ze_Jurassic_World_Z [52%]
Ze_Jumping_Area [37%]
(04/02/2019, 05:15 PM)kikizon2 escribió: Me voy por un tiempo y cuando regreso veo esto...
Mensajes: 3,077
Temas: 33
Registro en: May 2017
Reputación:
34
Elimina esto...
Código PHP: show_menu(id, (1<<9), menu, -1, "handlerMenu");
Mensajes: 16
Temas: 4
Registro en: Jan 2020
Reputación:
0
Buenas, primero que nada quiero aclarar que tengo conocimiento 0 en esto del amx, compilación, etc.. Ando en la búsqueda de un plugins que cuente las horas de juego de los player que entren a mi servidor y que tenga la opción de reiniciarlo semanalmente. Quiero premiar a los players mas viciosos y que tengan la mayor cantidad de horas acumuladas. No se si me explico?
De antemano agradezco a todos, en especial, a aquellos que puedan ayudarme con lo que digo. Salu2
La vida es un parque, pero cada etapa es una base y hay que pisar home antes que lo inesperado te pase.
|