[HELP] Menu and gameMenu

Hello,

I would like that when we open the menu of the game, my menu hides and is displayed when the game menu is closed.

  if IsPauseMenuActive() then
    self.gameMenu = true
  else
    self.gameMenu = false
  end

The esc key also corresponds to 202

 if IsControlJustPressed(1, 202) and GetLastInputMethod(2) and not self.gameMenu then
PlaySound(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0, 1)
end