Get when player press next or back in a new style menu
I tried a lot of differents ways, but none of those works.
|
Re: Get when player press next or back in a new style menu
PHP Code:
|
Re: Get when player press next or back in a new style menu
I used it in a switch and doesn't work:\
[Edit] Tried in a if statement and still not working. |
Re: Get when player press next or back in a new style menu
You can't catch that directly through the menu system. Newmenus are supposed to hide pagination and will handle those events internally. The menu callback will not be executed: https://github.com/alliedmodders/amx...a_api.cpp#L993
You should try hooking the "menuselect" command, check if player has a newmenu open and then work out if the player has pressed next or back. Keep in mind that MENU_EXIT and MENU_BACK are special values defined by the newmenu system, so you have to take the number of items and pagination into account. May I ask what you want to achieve? Maybe there is a more appropriate solution to your problem. |
Re: Get when player press next or back in a new style menu
I tried to get the page number in a variable to when you choose something in the menu it shows the last page viewed.
I was reading the library of newmenus and I find player_menu_info(), then I used Code:
Is it a good way? Thanks! |
Re: Get when player press next or back in a new style menu
Sounds good.
|
Re: Get when player press next or back in a new style menu
Quote:
|
| All times are GMT -4. The time now is 21:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.