[FREE] WarMenu - Lua Menu Framework

Was never complaining dude just asking and i would add it my self but at the moment don’t have time just trying to help recommend an idea…

Anyone got any ideas on how to set it so for example I have these options in a combo box, m9, glock, smg. If one of these is selected and button “equip” is pressed then trigger the event assigned to that weapon?

Such as if weapon is selected, then equip selected weapon, then triggerevent.

Hi

I’m doing a clothes script on an ES but I have a problem updating the PED when I’m in the menu I test everything but I do not find how to do I’m block

here is my problem right now :

Check Usage section for WarMenu.ComboBoxexample.

Is it your script?
If yes - share your code, if no - ask script developer?

Project is suspended

There will be no more updates

You can still try to get support here

I would recommend to use NativeUILua because it have better architecture and more options

Hello :slight_smile:

yes it’s my script create from a to z for the code here is the code in question:

https://pastebin.com/AmEux3mg

How do I do this?..

how do i add submenus

This is fresh :rotating_light:

However, is it possible to put images into the menu
(say if I was going to create a vehicle spawner, would I be able to show the vehicle as an image)?

Is possible to make it close itself quickly after pressing escape? I’ve seen it before, but only for resources working with nui focus… :confused:

Love this Release!
Good job man!

Yes, but you should code it by yourself.

So, I have followed the instructions laid out in the readme file. my code looks like this:

__resource.lua

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

description 'FiveM LLRP Client Menu'

client_script{
    '@warmenu/warmenu.lua'
    'lifeLikeMenu.lua'
} 

And then my lua script:

Citizen.CreateThread(function()
	local items = { "Online Player List", "Character", "Vehicle", "Weapon", "Word", "Settings", "Close" }
	local currentItemIndex = 1
	local selectedItemIndex = 1
	local checkbox = true

	WarMenu.CreateMenu('lifeLike', 'Life Like Menu')
	WarMenu.CreateSubMenu('Close', 'lifeLike', 'Are you sure?')

	while true do
		if WarMenu.IsMenuOpened('lifeLike') then
			if WarMenu.CheckBox('Checkbox', checkbox, function(checked)
					checkbox = checked
				end) then
					-- Do your stuff here
			elseif WarMenu.ComboBox('Combobox', items, currentItemIndex, selectedItemIndex, function(currentIndex, selectedIndex)
					currentItemIndex = currentIndex
					selectedItemIndex = selectedIndex

					-- Do your stuff here if current index was changed (don't forget to check it)
				end) then
					-- Do your stuff here if current item was activated
			elseif WarMenu.MenuButton('Exit', 'Close') then
			end

			WarMenu.Display()
		elseif WarMenu.IsMenuOpened('Close') then
			if WarMenu.Button('Yes') then
				WarMenu.CloseMenu()
			elseif WarMenu.MenuButton('No', 'lifeLike') then
			end

			WarMenu.Display()
		elseif IsControlJustReleased(0, 244) then -- M by default
			WarMenu.OpenMenu('lifeLike')
		end

		Citizen.Wait(0)
	end
end)



-- AddEventHandler('onClientMapStart', function()
--     -- 'open the menu' code 
--     end)

I have included the folder called warmenu which contains its own `__resource.lua and its own code. Any help would be greatly appreciated.

… but I didn’t see any question in your post :thinking:

Oh my bad, The code doesn’t seem to run. When I try to open the menu, nothing happens.

Try this:

AddEventHandler('playerSpawned', function()
  WarMenu.OpenMenu('lifeLike')
end)

And check your console for any errors.

Ok I will try it now, I have checked my console, no errors when trying to open.

Make sure that warmenu and your resource were started.
Make sure that your script is actually running (added to your __resource.lua).
Change WarMenu.debug to true to see if your menus were created.

The menu did not open onload. I will include what I have done in a zip file, I suspect that there is something wrong with my file structure. When I try to start warmenu, the server says that it couldn’t find warmenu. LifeLikeMenu.tar.gz (17.5 KB)