When the menu is displayed, set bool to false. When\if he selects something, set it to true.
PHP Code:
new g_bSelectedMenu;
#define CheckFlag(%1) (g_bSelectedMenu & (1<<(%1 & 31 )))
#define SetFlag(%1) (g_bSelectedMenu |= (1<<(%1 & 31 )))
#define RemFlag(%1) (g_bSelectedMenu &= ~(1<<(%1 & 31 )))
To set the bool to false:
PHP Code:
//Set all players bool to false
g_bSelectedMenu = 0;
//Set single player bool to false
RemFlag( id );
To set the bool to true:
Check if the bool is true:
PHP Code:
CheckFlag( id );
__________________