PDA

View Full Version : Unique VoteMenu per player?


TheVirus
01-06-2012, 15:23
Is it possible to display a different VoteMenu to each client? I ask because I modified mapchooser_extended to also randomize the order of the maps for each client, but it seems that you can't modify the menu handle after VoteMenu() has been called.

pseudo-code of what I'm doing:

for each client
randomize map array order
count = GetMenuItemCount(hMenu)
VoteMenu(hMenu, clients, 1, 20)
remove 'count' items from the menu
continue


After VoteMenu() is called, hMenu is no longer valid, which leads me to believe that you can't display unique menus to each player this way.

Is what I want to do possible without having to create a custom VoteMenu()?

Steell
01-06-2012, 15:36
It's possible, but it would be a complete hack of SM's vote and menu system. Also, I'm fairly certain that it would break SM's vote progress tracker (sm_vote_progress_* in sourcemod.cfg).

You're better off either modifying SM's voting directly or filing a SM feature request.

TheVirus
01-06-2012, 15:53
It's possible, but it would be a complete hack of SM's vote and menu system. Also, I'm fairly certain that it would break SM's vote progress tracker (sm_vote_progress_* in sourcemod.cfg).

You're better off either modifying SM's voting directly or filing a SM feature request.

I see. Well, that's rather disappointing, I suppose. I guess I can use ShowMenu() and track results internal to the script. But then it won't display the progress. This isn't going to be easy.