Raised This Month: $ Target: $400
 0% 

Solved Fix for AMXX custom menus (from ZP)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-07-2021 , 19:02   Re: Fix for AMXX custom menus (from ZP)
Reply With Quote #2

This is to make sure you are not viewing another menu from the game itself, which would cause a problem.
You don't need that in the latest versions of amx mod x.

menu_display: https://github.com/alliedmodders/amx...menus.cpp#L914

show_menu: https://github.com/alliedmodders/amx...modx.cpp#L1345
Code:
if (g_bmod_cstrike)
	{
		enum JoinState { Joined = 0 };
		enum MenuState { Menu_OFF = 0, Menu_ChooseTeam = 1, Menu_ChooseAppearance = 3 };

		GET_OFFSET("CBasePlayer", m_iJoiningState);
		GET_OFFSET("CBasePlayer", m_iMenu);

		if (get_pdata<int>(pPlayer->pEdict, m_iJoiningState) == Joined || (get_pdata<int>(pPlayer->pEdict, m_iMenu) != Menu_ChooseTeam && get_pdata<int>(pPlayer->pEdict, m_iMenu) != Menu_ChooseAppearance))
		{
			set_pdata<int>(pPlayer->pEdict, m_iMenu, Menu_OFF);
		}
	}
__________________









Last edited by CrazY.; 06-07-2021 at 19:04.
CrazY. 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 02:31.


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