help wiht menu

i need help if this menu this is menu for teror and i wont ct can open the menu but do not choose something from the menu if is choose say to hem : "you can use on this menu you must be teror"

thx






PHP Code:







 Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() 
{
register_clcmd("say /help", "MenuHelp")
register_clcmd("say_team /help", "MenuHelp")
}
public 
MenuHelp(id)
{
if (
cs_get_user_team(id) == CS_TEAM_T)
{
HelpMenu(id)
return 
PLUGIN_HANDLED
}
else if(
get_us er_team(id) != 1)
{
return 
PLUGIN_HANDLED
}
return 
PLUGIN_HANDLED
}
public 
HelpMenu(id) 
{
new 
menu = menu_create("Help Menu", "menu_handler");

menu_additem(menu, "Show Admin", "1");
menu_additem(menu, "Show Help Motd", "2");
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu);
}
public 
menu_handler(id, menu, item)
{ 
if(
item == MENU_EXIT)
{
menu_destroy(menu);
return 
PLUGIN_HANDLED;
}

new 
data[6], szName[64];
new 
access, callback;

menu_item_getinfo(menu, item, access, data,5, szName, 63, callback);
new 
key = str_to_num(data);
switch(
key)
{
case 
1:
{
client_cmd(id,"say /admin")
}

case 
2:
{
client_cmd(id,"say /motd")
}
}
return 
PLUGIN_HANDLED
} 











Orignal From: help wiht menu

No comments

Not a single link is allowed to submit in comment :o