Quote:
Originally Posted by .Dare Devil.
new key[6]
to
new key[7]
|
That won't change anything. In fact, he could even use
new key[3]
EDIT:
All seven options show up on one page for me with this test plugin (note the change of TotalReasonsGlobal; this way you won't need to change the number when adding or removing options from reasons_global):
PHP Code:
#include <amxmodx>
new const reasons_global[][64] =
{
"Camping",
"Spamming",
"Insulting",
"Bad Behaving",
"High Ping",
"Racism",
"Cheating"
}
new TotalReasonsGlobal = sizeof(reasons_global)
public plugin_init()
{
register_clcmd("say test", "GlobalreasonMenu")
}
public GlobalreasonMenu(id)
{
new Reasonmenu, Temp[64]
formatex(Temp,63, "\rChoose reason:")
Reasonmenu = menu_create(Temp, "globalban_reason_handler")
new key[3]
for(new i; i < TotalReasonsGlobal; i++)
{
num_to_str(i, key, sizeof(key)-1)
menu_additem(Reasonmenu, reasons_global[i], key, 0)
}
menu_display(id, Reasonmenu)
return PLUGIN_HANDLED
}
public globalban_reason_handler(id, menu, item)
{
client_print(0, print_chat, "Option selected")
}
__________________