Raised This Month: $ Target: $400
 0% 

[SOLVED][CS] New Menus: pressing Back/Next triggers radio commands


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-17-2011 , 10:54   Re: [CS] New Menus: pressing Back/Next triggers radio commands
Reply With Quote #3

After doing some testing, I noticed a couple things:
1. When you use a radio menu (for example), your "menu code" is kept at that radio menu's menu code until you use the "exit" option.
2. When you open a custom menu from AMXX on top of a default CS menu (like radio menu), it keeps the default CS menu's menu code.

To fix this, you can just set the menu code to 0 every time you use show_menu() or menu_display().
This fix can also be applied to the AMXX core whenever it gets ready to be fixed.

Thanks to Connor for the offset and function in a post of his.

Code:
#include <amxmodx> #include <fakemeta> // m_iMenuCode = 205, "player" linux offset = 5 #define cs_set_user_menu(%1,%2) set_pdata_int(%1, 205, %2, 5) // ... // reset menu code to 0 so we don't conflict with other CS menus cs_set_user_menu(id, 0) // show our own menu menu_display(id, menu)

EDIT:

Replied to the Bug Report. Hopefully this will be fixed in one of the next few developer builds.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 06-17-2011 at 10:57.
Exolent[jNr] is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode