Raised This Month: $ Target: $400
 0% 

Need help! Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Christjanno12
Junior Member
Join Date: Mar 2013
Old 03-10-2013 , 16:29   Need help! Menu
Reply With Quote #1

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");
}

Last edited by YamiKaitou; 03-14-2013 at 14:52. Reason: Delete
Christjanno12 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 03-10-2013 , 16:44   Re: Need help! Menu
Reply With Quote #2

Add register_clcmd("chooseteam", "ChooseTeam"); in plugin_init().
__________________
hleV is offline
Christjanno12
Junior Member
Join Date: Mar 2013
Old 03-10-2013 , 16:50   Re: Need help! Menu
Reply With Quote #3

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"
Christjanno12 is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 03-10-2013 , 21:07   Re: Need help! Menu
Reply With Quote #4

That variable isn't created/declared.
Torge is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-10-2013 , 21:13   Re: Need help! Menu
Reply With Quote #5

Quote:
Originally Posted by Torge View Post
That variable isn't created/declared.
Wrong, it is created and assigned a value but never used.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode