Oto logi#include <amxmodx>
#include <amxmisc>
new const PLUGIN[] = "Menu Dzwiekow"
new const VERSION[] = "1.0"
new const AUTHOR[] = "byQQ"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
//Komendy by wlaczyc menu
register_clcmd("say /dzwieki", "weaponsmenu")
register_clcmd("say_team /dzwieki", "weaponsmenu")
// Koniec
register_clcmd("bialoczerw", "say_bialoczerw")
register_clcmd("spartans", "say_spartans")
register_clcmd("40to1", "say_40to1")
set_task(60.0, "reklama", _, _, _, "b")
}
public plugin_precache()
{
precache_sound("sound/dzwieki/bialoczerw.mp3")
precache_sound("sound/dzwieki/spartans.mp3")
precache_sound("sound/dzwieki/40to1.mp3")
}
public say_bialoczerw(id)
{
client_cmd(0,"mp3 play sound/dzwieki/bialoczerw")
}
public say_spartans(id)
{
client_cmd(0,"mp3 play sound/dzwieki/spartans")
}
public say_40to1(id)
{
client_cmd(0,"mp3 play sound/dzwieki/40to1")
}
public reklama(id)
{
client_print(id, print_chat, "^x04 c*******.**^x04 Wpisz /dzwieki by zobaczyc menu!")
}
public weaponsmenu(id)
{
new menu = menu_create("Dzwieki!:", "menu_handler")
menu_additem(menu, "Bialoczerw", "1", 0)
menu_additem(menu, "Spartans", "2", 0)
menu_additem(menu, "40to1", "3", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
public menu_handler(id, menu, item)
{
if (item == MENU_EXIT)
{
return PLUGIN_HANDLED
}
new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1:{
client_cmd(id, "bialoczerw")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 2:{
client_cmd(id, "spartans")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 3:{
client_cmd(id, "40to1")
menu_destroy(menu)
return PLUGIN_HANDLED
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
Plugin przrestał działać gdy dodałem 3 utwór co zrobić by dodać 3 utwór pomocy (plugin jest dobrze skomplitowany!!!)L 07/05/2009 - 15:17:24: Start of error session.
L 07/05/2009 - 15:17:24: Info (map "cs_1337_assault") (file "addons/amxmodx/logs/error_20090705.log")
L 07/05/2009 - 15:17:24: [AMXX] Plugin file open error (plugin "amx_haconc.amxx")
L 07/05/2009 - 15:17:24: [AMXX] Unknown error (plugin "dzwieki.amxx")
L 07/05/2009 - 15:17:26: Start of error session.
L 07/05/2009 - 15:17:26: Info (map "cs_1337_assault") (file "addons/amxmodx/logs/error_20090705.log")
L 07/05/2009 - 15:17:26: [AMXX] Plugin file open error (plugin "amx_haconc.amxx")
L 07/05/2009 - 15:17:26: [AMXX] Unknown error (plugin "dzwieki.amxx")
L 07/05/2009 - 15:17:26: Client CVAR querying is not enabled - check MM version!
L 07/05/2009 - 15:17:26: [AMXX] Run time error 10 (plugin "interp_kick.amxx") (native "query_client_cvar") - debug not enabled!
L 07/05/2009 - 15:17:26: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).