Skip to content

Rexshack-RedM/rsg-menubase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsg_framework

📜 rsg-menubase

Menu base system for RedM using RSG Core.

Platform License

A flexible and immersive menu framework built on NUI for RedM.
Designed to be used by RSG Core and its official resources.


🛠️ Dependencies

  • rsg-core (framework & events)
  • ox_lib (optional for locale support)

License: GPL‑3.0


✨ Features

  • 📋 Dynamic NUI menu system for RSG Core.
  • 🧩 Supports multiple menu types via MenuData.RegisteredTypes.
  • 🎨 Stylized Red Dead UI (paper textures, ink fonts, western visuals).
  • 🔄 Menu actions: open, close, submit, cancel, and value change.
  • 🧠 Player control options: disable movement, disable inventory, mouse control.
  • 🎧 Open/close sound effects (menu_open.mp3, menu_close.mp3).
  • ⚙️ Simple NUI API through client events and exports.

⚙️ Example Usage

-- Example: Open a simple menu
local elements = {
    { label = "Option 1", value = "opt1" },
    { label = "Option 2", value = "opt2" }
}

MenuData.Open('default', GetCurrentResourceName(), 'example_menu', {
    title = "Example Menu",
    align = "top-left",
    elements = elements
}, function(data, menu)
    print("Selected:", data.current.value)
    menu.close()
end, function(data, menu)
    menu.close()
end)

🧠 Menus use the default type defined in client/main.lua. You can register custom types using MenuData.RegisterType().


🔁 Client Events

Event Description
rsg-menubase:client:openMenu Opens a menu UI.
rsg-menubase:client:closeMenu Closes the current menu.
rsg-menubase:client:disableMovement Disables player movement while a menu is open.
rsg-menubase:client:lockInventory Locks inventory while the menu is active.

📂 Installation

  1. Add rsg-menubase to your resources/[rsg] folder.
  2. In your server.cfg, add:
    ensure ox_lib
    ensure rsg-core
    ensure rsg-menubase
  3. Restart your server.

🎨 Customization

You can modify the UI appearance by editing files under html/:

  • html/ui.html — menu layout
  • html/css/app.css — styles
  • html/js/app.js — logic
  • html/sounds/menu_open.mp3 / menu_close.mp3 — sounds

All assets (paper, ink, icons, fonts) are stored in html/img/.


💎 Credits

Releases

No releases published

Packages

No packages published

Contributors 8