Mensajes: 144
Temas: 77
Registro en: Sep 2020
Reputación:
0
13/07/2021, 01:20 AM
(Última modificación: 14/07/2021, 06:39 PM por MalitoMaloso. Edited 5 times in total.)
hola me pueden ayudar agregar de que admin ponga tema
Código PHP: #include <amxmodx>
#define PLUGIN "Random Sounds by Command and Menu" #define VERSION "1.2" #define AUTHOR "[N]drs"
enum _:DATA { NAME[20], RUTA[126] }
new const SONIDO[][DATA] = { {"xd", "sound//xd.mp3"}, {"Amaz azul", "sound//tomo.mp3"}
}
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /play", "play") register_clcmd("say /musica", "play_menu") register_clcmd("say xxxx", "stop") }
public plugin_precache() { for(new i; i < sizeof(SONIDO); i++){ precache_generic(SONIDO[i][RUTA]) } }
public play(id) { if(get_user_flags(id) & ADMIN_LEVEL_H) { new i = random_num(0, sizeof(SONIDO)) client_cmd(0, "Mp3 play %s", SONIDO[i][RUTA]) }
return PLUGIN_HANDLED }
public play_menu(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_H)) return PLUGIN_HANDLED
new menu = menu_create("\yMenu Musica Admin Full", "handlermenu");
for(new i; i < sizeof(SONIDO); i++) { menu_additem(menu, SONIDO[i][NAME], _, _) }
menu_display(id, menu)
return PLUGIN_HANDLED }
public handlermenu(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED }
client_cmd(0, "Mp3 play %s", SONIDO[item][RUTA])
menu_destroy(menu)
return PLUGIN_HANDLED }
public stop(id) client_cmd(0, "Mp3 stop")
Mensajes: 448
Temas: 38
Registro en: May 2020
Reputación:
19
Código PHP: #include <amxmodx>
#define PLUGIN "Random Sounds by Command and Menu" #define VERSION "1.4" #define AUTHOR "[N]drs"
enum _:DATA { NAME[20], RUTA[126] }
new const SONIDO[][DATA] = { {"Mx ke", "sound/music/vito.mp3"}, {"Ye", "sound/music/Yera.mp3"}, {"Yz azul", "sound/music/too.mp3"} }
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /play", "play") register_clcmd("say /musica", "play_menu") register_clcmd("say /stop", "stop_sound") }
public plugin_precache() { for(new i; i < sizeof(SONIDO); i++) precache_generic(SONIDO[i][RUTA]) }
public play(id) { if(get_user_flags(id) & ADMIN_LEVEL_H) { new i = random_num(0, sizeof(SONIDO)) play_sound(id, i) }
return PLUGIN_HANDLED }
public play_menu(id) { if(~get_user_flags(id) & ADMIN_LEVEL_H) return PLUGIN_HANDLED
new iMenu = menu_create("\yMenu Musica Admin Full", "handlerMenu")
for(new i; i < sizeof(SONIDO); i++) menu_additem(iMenu, SONIDO[i][NAME])
menu_display(id, iMenu)
return PLUGIN_HANDLED }
public handlerMenu(id, iMenu, item) { if(item == MENU_EXIT) { menu_destroy(iMenu) return PLUGIN_HANDLED }
play_sound(id, item) menu_destroy(iMenu)
return PLUGIN_HANDLED }
play_sound(id, const iSound) { client_cmd(id, "Mp3 play %s", SONIDO[iSound][RUTA]) client_print_color(id, print_team_grey, "^3ADMIN ^4%n ^3a cambiado el tema a ^4%s", id, SONIDO[iSound][NAME]) }
public stop_sound(id) { client_cmd(0, "Mp3 stop") return PLUGIN_HANDLED }
Mensajes: 144
Temas: 77
Registro en: Sep 2020
Reputación:
0
pero ahora solo la escucha el que cambia el tema quedo mal
esta bien eso
3ADMIN ^4%n ^3a cambiado el tema a ^4%s
pero solo aparece el mensaje para el que lo cambio y ahora la musica no se escucha para todos
Mensajes: 448
Temas: 38
Registro en: May 2020
Reputación:
19
Código PHP: #include <amxmodx>
#define PLUGIN "Random Sounds by Command and Menu" #define VERSION "1.4" #define AUTHOR "[N]drs"
enum _:DATA { NAME[20], RUTA[126] }
new const SONIDO[][DATA] = { {"Mx ke", "sound/music/vito.mp3"}, {"Ye", "sound/music/Yera.mp3"}, {"Yz azul", "sound/music/too.mp3"} }
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /play", "play") register_clcmd("say /musica", "play_menu") register_clcmd("say /stop", "stop_sound") }
public plugin_precache() { for(new i; i < sizeof(SONIDO); i++) precache_generic(SONIDO[i][RUTA]) }
public play(id) { if(get_user_flags(id) & ADMIN_LEVEL_H) { new i = random_num(0, sizeof(SONIDO)) play_sound(id, i) }
return PLUGIN_HANDLED }
public play_menu(id) { if(~get_user_flags(id) & ADMIN_LEVEL_H) return PLUGIN_HANDLED
new iMenu = menu_create("\yMenu Musica Admin Full", "handlerMenu")
for(new i; i < sizeof(SONIDO); i++) menu_additem(iMenu, SONIDO[i][NAME])
menu_display(id, iMenu)
return PLUGIN_HANDLED }
public handlerMenu(id, iMenu, item) { if(item == MENU_EXIT) { menu_destroy(iMenu) return PLUGIN_HANDLED }
play_sound(id, item) menu_destroy(iMenu)
return PLUGIN_HANDLED }
play_sound(id, const iSound) { client_cmd(0, "Mp3 play %s", SONIDO[iSound][RUTA]) client_print_color(id, print_team_grey, "^3ADMIN ^4%n ^3a cambiado el tema a ^4%s", id, SONIDO[iSound][NAME]) }
public stop_sound(id) { client_cmd(0, "Mp3 stop") return PLUGIN_HANDLED }
Mensajes: 144
Temas: 77
Registro en: Sep 2020
Reputación:
0
sigue igual solo se escucha para el que pone el tema , y el mensaje solo sale para el que pone el tema
yo lo tenia que todos los escuchaban solo era agregar el mensaje
Mensajes: 448
Temas: 38
Registro en: May 2020
Reputación:
19
Fíjate bien, tal vez estás poniendo el plugin anterior, de todas formas, compila esta version:
Código PHP: #include <amxmodx>
#define PLUGIN "Random Sounds by Command and Menu" #define VERSION "1.4-2" #define AUTHOR "[N]drs"
enum _:DATA { NAME[20], RUTA[126] }
new const SONIDO[][DATA] = { {"Mx ke", "sound/music/vito.mp3"}, {"Ye", "sound/music/Yera.mp3"}, {"Yz azul", "sound/music/too.mp3"} }
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /play", "play") register_clcmd("say /musica", "play_menu") register_clcmd("say /stop", "stop_sound") }
public plugin_precache() { for(new i; i < sizeof(SONIDO); i++) precache_generic(SONIDO[i][RUTA]) }
public play(id) { if(get_user_flags(id) & ADMIN_LEVEL_H) { new i = random_num(0, sizeof(SONIDO)) play_sound(id, i) }
return PLUGIN_HANDLED }
public play_menu(id) { if(~get_user_flags(id) & ADMIN_LEVEL_H) return PLUGIN_HANDLED
new iMenu = menu_create("\yMenu Musica Admin Full", "handlerMenu")
for(new i; i < sizeof(SONIDO); i++) menu_additem(iMenu, SONIDO[i][NAME])
menu_display(id, iMenu)
return PLUGIN_HANDLED }
public handlerMenu(id, iMenu, item) { if(item == MENU_EXIT) { menu_destroy(iMenu) return PLUGIN_HANDLED }
play_sound(id, item) menu_destroy(iMenu)
return PLUGIN_HANDLED }
play_sound(id, const iSound) { client_cmd(0, "Mp3 play %s", SONIDO[iSound][RUTA]) client_print_color(0, print_team_grey, "^3ADMIN ^4%n ^3a cambiado el tema a ^4%s", id, SONIDO[iSound][NAME]) }
public stop_sound(id) { client_cmd(0, "Mp3 stop") return PLUGIN_HANDLED }
Mensajes: 144
Temas: 77
Registro en: Sep 2020
Reputación:
0
14/07/2021, 03:10 PM
(Última modificación: 14/07/2021, 03:11 PM por MalitoMaloso. Edited 1 time in total.)
gracias bro ai si
oye bro cuanto los cobras por arreglar este modo
ph_core plugin bugeaado ?
puedo pagar por paypal
Mensajes: 448
Temas: 38
Registro en: May 2020
Reputación:
19
14/07/2021, 03:23 PM
(Última modificación: 14/07/2021, 03:24 PM por [N]drs.)
(14/07/2021, 03:10 PM)MalitoMaloso escribió: gracias bro ai si
oye bro cuanto los cobras por arreglar este modo
ph_core plugin bugeaado ?
puedo pagar por paypal
Escríbeme por privado los bugs a detalle para acordar y que modo es ese?
Mensajes: 144
Temas: 77
Registro en: Sep 2020
Reputación:
0
14/07/2021, 03:27 PM
(Última modificación: 14/07/2021, 03:39 PM por MalitoMaloso.)
te hable al discord recien
te hable al discord pero no me has respondido
CS Prop Hunt v1.1
|