Raised This Month: $ Target: $400
 0% 

all menus crash the server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hzqst
Senior Member
Join Date: Jul 2008
Old 07-22-2008 , 04:21   all menus crash the server
Reply With Quote #1

Quote:
public zmmenu(id) {
new title[51]
format(title, 50, "%L", id, "ZM_MENU",0)
new menu = menu_create(title, "zmmenuHandler")
new menuitem_class[64]
format(menuitem_class, 63, "%L", id, "ZM_MENU_CLASS")
new menuitem_tele[64]
format(menuitem_tele, 63, "%L", id, "ZM_MENU_TELE")
new menuitem_skill[64]
format(menuitem_skill, 63, "%L", id, "ZM_MENU_SKILL")
new menuitem_help[64]
format(menuitem_help, 63, "%L", id, "ZM_MENU_HELP")
new menuitem_stats[64]
format(menuitem_stats, 63, "%L", id, "ZM_MENU_STATS")
menu_additem(menu, menuitem_class, "1", 0)
menu_additem(menu, menuitem_tele, "2", 0)
menu_additem(menu, menuitem_skill, "3", 0)
menu_additem(menu, menuitem_help, "4", 0)
menu_additem(menu, menuitem_stats, "5", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
return PLUGIN_HANDLED
}
public zmmenuHandler(id, menu, item) {
if(item == MENU_EXIT) {
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], name[64]
new access, callback
menu_item_getinfo(menu, item, access, data, 5, name, 63, callback)
new key = str_to_num(data)
switch(key) {
case 1: zmclass(id)
case 2: zmtele(id)
case 3: zmskill(id)
case 4: zmhelp(id)
case 5: zmstats(id)
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
Quote:
public plugin_init() {
register_clcmd("say !zmenu", "zmmenu", 0, "- display zm main menu")
register_clcmd("say_team !zmenu", "zmmenu", 0, "- display zm main menu")
}
no error but crash my server when i say !zmenu(amxx1. 8 )
it works fine on amxx1.76
hzqst 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 05:34.


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