Need help! Menu
Hey i made this menu, i want press "M" ON CS ingame and must come the menu with list of commands etc, the code is here. but idk why menu dont comes inside server if i press M ,!
Comes chooseteam but i want comes menu :(:( example:/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" #define VIP_ACCESS ADMIN_LEVEL_H // t flag #define ADMIN_ACCESS ADMIN_BAN // d flag #define VADMIN_ACCESS ADMIN_LEVEL_C // o flag #define IMM_ACCESS ADMIN_IMMUNITY // a flag #define KORRAHOIDJA ADMIN_LEVEL_F // r flag #define OMANIK ADMIN_LEVEL_E // q flag public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_plugin("Dr Manager", "V1", "Janno"); register_clcmd("say /rules", "Rules"); } /*============================================ ================================ =======[ Deathrun Menüü ] ============================================= ================================*/ public ChooseTeam(id) { DeathRunMenu(id); return PLUGIN_HANDLED; } public Vip_CallBack(id, Menu, item) return get_user_flags(id) & VIP_ACCESS ? ITEM_ENABLED : ITEM_DISABLED; public DeathRunMenu(id) { new DrMenu = menu_create("Joodikute Deathrun V1 | by ch.janno", "dr_menu_handler"); new VipCallBack = menu_makecallback("Vip_CallBack"); menu_additem(DrMenu, "Rules", "1", 0); menu_display(id, DrMenu, 0); } public dr_menu_handler(id, DrMenu, item) { if(item == MENU_EXIT) { menu_destroy(DrMenu); return PLUGIN_HANDLED; }new data[6], szName[64], access, callback; menu_item_getinfo(DrMenu, item, access, data, charsmax(data), szName, charsmax(szName), callback); new key = str_to_num(data); switch(key) { //case 1: { // new iName[32]; // get_user_name(id, iName, charsmax(iName)); // if(!g_TerroQueue[id]) { // g_TerroQueueCount++; // g_TerroQueue[g_TerroQueueCount] = id; // g_TerroQueue[id] = true; // ChatColor(0, "%s !t%s !nliitus terroristi jƤrjekorraga", eTag, iName); // return PLUGIN_HANDLED // } else { // for(new i=0; i < g_MaxPlayers; i++) { // if(g_TerroQueue[i] == id) { // g_TerroQueue[g_TerroQueueCount] = false; // g_TerroQueueCount--; // g_TerroQueue[id] = false; // ChatColor(0, "%s !t%s !nlahkus terroristi jƤrjekorrast", eTag, iName); // return PLUGIN_HANDLED; // } // } // return PLUGIN_HANDLED; // } //} case 1: { Rules(id); } } menu_destroy(DrMenu); return PLUGIN_HANDLED; } public Rules(id) { show_motd(id, "http://www.upload.ee/image/3123894/reeglid.PNG", "Reeglid"); } |
Re: Need help! Menu
Add register_clcmd("chooseteam", "ChooseTeam"); in plugin_init().
|
Re: Need help! Menu
i got 2 warnings idk why
/tmp/textQHP9B5.sma(21) : warning 217: loose indentation /tmp/textQHP9B5.sma(39) : warning 204: symbol is assigned a value that is never used: "VipCallBack" |
Re: Need help! Menu
That variable isn't created/declared.
|
Re: Need help! Menu
Quote:
|
| All times are GMT -4. The time now is 21:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.