Помогите профиксить!, Плиз! |
Здравствуйте, гость Вход | Регистрация
Наши новости:
|
|
Помогите профиксить!, Плиз! |
byvaliy |
14.12.2010, 18:36
Сообщение
|
Всем доброго времени суток! Помогите плиз подправить плагин! Кароче при убийстве показывается менюшка, где выбирается что показать в чат... Не работает меню.
CODE #include <amxmodx>
#include <amxmisc> #define VERSION "0.1" new g_SayText, g_MaxClients public plugin_init() { register_plugin("Kill Menu", VERSION, "Byv@liy"); register_event("DeathMsg", "event_death", "a"); g_MaxClients = get_maxplayers() g_SayText = get_user_msgid("SayText"); } public event_death() { new killer = read_data(1); new victim = read_data(2); if ( !( 1 <= killer <= g_MaxClients ) || killer == victim ) { return PLUGIN_CONTINUE; } new vicname[32], killname[32] get_user_name(victim,vicname,31); get_user_name(killer,killname,31); new menu=menu_create("\rПункты","menu_handler") menu_additem(menu,"\w1ый пункт","1") menu_additem(menu,"\w2ой пункт","2") menu_additem(menu,"\w3ий пункт","3") menu_setprop(menu,MPROP_EXIT,MEXIT_ALL) menu_display(vicname,menu,0) return PLUGIN_HANDLED } public menu_handler(id,menu,item) { if(item==MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6],iName[64],access, callback menu_item_getinfo(menu,item,access,data,5,iName,63,callback) new key = str_to_num(data) switch(key) { case 1:{ client_print(0,print_chat,"You have chosen the first item of the menu!") } case 2:{ client_print(0,print_chat,"You have chosen the second item of the menu!") } case 3:{ client_print(0,print_chat,"You have chosen the third item of the menu!") } } return PLUGIN_HANDLED } stock client_printc(const id, const string[], {Float, Sql, Resul,_}:...) { new msg[191], players[32], count = 1; vformat(msg, sizeof msg - 1, string, 3); replace_all(msg,190,"!g","^4"); replace_all(msg,190,"!y","^1"); replace_all(msg,190,"!t","^3"); if(id) players[0] = id; else get_players(players,count,"ch"); for (new i = 0; i < count; i++) { if (is_user_connected(players[i])) { message_begin(MSG_ONE_UNRELIABLE, g_SayText,_, players[i]); write_byte(players[i]); write_string(msg); message_end(); } } } |
|
|
|