diff --git a/plugins/basefunvotes.sp b/plugins/basefunvotes.sp index d1812c17..6e573050 100644 --- a/plugins/basefunvotes.sp +++ b/plugins/basefunvotes.sp @@ -388,12 +388,13 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, param1, param2) else if (action == MenuAction_Display) { decl String:title[64]; - GetMenuTitle(g_hVoteMenu, title, sizeof(title)); + GetMenuTitle(menu, title, sizeof(title)); decl String:buffer[255]; 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) { @@ -412,7 +413,7 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, 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"); } diff --git a/plugins/basevotes.sp b/plugins/basevotes.sp index 999f279f..e34b0e41 100644 --- a/plugins/basevotes.sp +++ b/plugins/basevotes.sp @@ -372,12 +372,13 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, param1, param2) if (g_voteType != voteType:question) { decl String:title[64]; - GetMenuTitle(g_hVoteMenu, title, sizeof(title)); + GetMenuTitle(menu, title, sizeof(title)); decl String:buffer[255]; 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) @@ -397,7 +398,7 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, 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"); }