FiveM native Rage Menu, built with React.
- High-performance script
- Cached component and menu state
- Runtime-editable menus and components
- Fully typed
-
Download the latest release from GitHub.
-
Extract the contents of the zip file into your
resources
folder and remove-main
from the folder name. -
Add the path of
meta.lua
to your Sumneko LLSworkspace.library
setting. -
Add
ensure ragemenu
to yourserver.cfg
.
Note
The menu offers more components and functions.
DOCUMENTATION COMING SOON.
--- you can create a menu once and reopen it at any time
--- state will be cached and reused
local menu = Menu:Create('Example', 'Example Subtitle')
local exampleButton = menu:AddButton('Example Button', 'Example Description', {
left = 'shop_ammo_icon'
})
exampleButton:OnClick(function(component)
print(component.label .. ' Clicked!')
end)
local exampleSlider = menu:AddSlider('Example Slider', 'Example Description', nil, 100, 0, 10, 50)
local removeSliderHandler = exampleSlider:OnChange(function(current)
print('current slider progress', current)
end)
exampleSlider:OnClick(function()
removeSliderHandler() -- this function removes the OnChange handler, that's above
print('Removed slider `OnChange` handler')
end)
RegisterCommand('example', function()
if menu:IsOpen() then
menu:Close()
else
menu:Open()
end
end, false)