Problem with vote menu
I customized the advanced vote menu from menus tutorial. For some reason it doesn't show up. I guess the problem is in the way menu items are added (with loop). Any ideas ?
Code:
|
Re: Problem with vote menu
You have to display the menu with menu_display(). You may need to loop through players like it's shown in the examples.
Also, your menu won't work because of "iNum". You should look at how it's done in the menus in the tutorials using num_to_str(). |
Re: Problem with vote menu
I done corrections where you said, only that player loop part remained (for now).
Code:
I get this error when I type "/vote": Code:
L 08/16/2010 - 00:57:20: Invalid menu id 8(9)Code:
menu_display ( tempid, gVoteMenu, 0 ) |
Re: Problem with vote menu
Look at the example in the new menus tutorial and do it like it is done there.
|
Re: Problem with vote menu
In "TheVote()" you are shown a menu that wasn't created yet.
|
Re: Problem with vote menu
Ok, thanks for the replies, I got everything working (though I had no chance to test the vote functionality with more than 2 players but hopefully it's working fine).
Only thing that is not working properly is closing the menu. When those 10 seconds are over and a player didn't vote, the menu is not closed. Any ideas ? Well I could use this: Code:
client_cmd(id, "slot10") |
Re: Problem with vote menu
Try to put instead of
PHP Code:
PHP Code:
|
Re: Problem with vote menu
It seems that it doesn't matter where I put menu_destroy(gVoteMenu); it sill doesn't work and show error:
Code:
L 08/16/2010 - 20:47:55: Invalid menu id 8(9) |
Re: Problem with vote menu
You cannot actually remove the menu from the player's screen.
|
Re: Problem with vote menu
I am looking for a method like in the default amxx vote menus - they closes automatically after some time.
I guess I will have to take a look at those menu codes. |
| All times are GMT -4. The time now is 21:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.