Fixed amb822. Fixed tag mismatches in vote plugins. Fixed "No votes casts"

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401370
This commit is contained in:
Michael McKoy 2007-08-22 00:58:47 +00:00
parent aa1d2b4c9e
commit f70881d641
2 changed files with 8 additions and 6 deletions

View File

@ -388,12 +388,13 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, param1, param2)
else if (action == MenuAction_Display) else if (action == MenuAction_Display)
{ {
decl String:title[64]; decl String:title[64];
GetMenuTitle(g_hVoteMenu, title, sizeof(title)); GetMenuTitle(menu, title, sizeof(title));
decl String:buffer[255]; decl String:buffer[255];
Format(buffer, sizeof(buffer), "%T", title, param1, g_voteInfo[VOTE_NAME]); Format(buffer, sizeof(buffer), "%T", title, param1, g_voteInfo[VOTE_NAME]);
SetMenuTitle(g_hVoteMenu, buffer); new Handle:panel = Handle:param2;
SetPanelTitle(panel, buffer);
} }
else if (action == MenuAction_DisplayItem) else if (action == MenuAction_DisplayItem)
{ {
@ -412,7 +413,7 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, param1, param2)
{ {
VoteSelect(menu, param1, param2); VoteSelect(menu, param1, param2);
}*/ }*/
else if (action == VoteCancel_NoVotes) else if (action == MenuAction_VoteCancel && param2 == VoteCancel_NoVotes)
{ {
PrintToChatAll("[SM] %t", "No Votes Cast"); PrintToChatAll("[SM] %t", "No Votes Cast");
} }

View File

@ -372,12 +372,13 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, param1, param2)
if (g_voteType != voteType:question) if (g_voteType != voteType:question)
{ {
decl String:title[64]; decl String:title[64];
GetMenuTitle(g_hVoteMenu, title, sizeof(title)); GetMenuTitle(menu, title, sizeof(title));
decl String:buffer[255]; decl String:buffer[255];
Format(buffer, sizeof(buffer), "%T", title, param1, g_voteInfo[VOTE_NAME]); Format(buffer, sizeof(buffer), "%T", title, param1, g_voteInfo[VOTE_NAME]);
SetMenuTitle(g_hVoteMenu, buffer); new Handle:panel = Handle:param2;
SetPanelTitle(panel, buffer);
} }
} }
else if (action == MenuAction_DisplayItem) else if (action == MenuAction_DisplayItem)
@ -397,7 +398,7 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, param1, param2)
{ {
VoteSelect(menu, param1, param2); VoteSelect(menu, param1, param2);
}*/ }*/
else if (action == VoteCancel_NoVotes) else if (action == MenuAction_VoteCancel && param1 == VoteCancel_NoVotes)
{ {
PrintToChatAll("[SM] %t", "No Votes Cast"); PrintToChatAll("[SM] %t", "No Votes Cast");
} }