i found
Code:
if (action == MenuAction_VoteEnd)
can get 'param2' forever.
i do this
Code:
public Help_CustomMenuHandler(Handle:menu, MenuAction:action, param1, param2)
{
// MapMenuHandler(menu, MenuAction_Select, 0, param1);
if (action == MenuAction_End)
{
CloseHandle(menu);
}
else if (action == MenuAction_Select) {
new String:itemval[256];
new String:typetext[256];
decl String:display[256];
GetMenuItem(menu, param2, itemval, sizeof(itemval), _, display, sizeof(display));
GetMenuItem(menu, param2, "", 0, _, typetext, sizeof(typetext));
PrintToChatAll("\x04[%N] \x03 command:%s typetext:%s",param1,itemval,typetext);
// MapMenuHandler(menu, MenuAction_Select, 0, param1);
}
else if (action == MenuAction_VoteEnd)
{
new String:itemval[256];
new String:typetext[256];
decl String:display[256];
GetMenuItem(menu, param2, itemval, sizeof(itemval), _, display, sizeof(display));
GetMenuItem(menu, param2, "", 0, _, typetext, sizeof(typetext));
PrintToChatAll("\x04[%N] \x03 command:%s typetext:%s",param1,itemval,typetext);
MapMenuHandler(menu, MenuAction_Select, 0, param1);
new Handle:dp;
CreateDataTimer(5.0, Timer_run, dp);
WritePackString(dp, itemval);
}
}
public MapMenuHandler(Handle:menu, MenuAction:action, client, itemNum)
{
PrintToChatAll("\x04[%i",itemNum);
}
this value is "1" forever.