Not the help I was hoping for…kind of lackluster answers tbh.
I don’t know why your talking about private methods either? No where in my post has private methods…in fact they are global methods
Your right it does kind of suck in some ways but I like it and want to try make it work, even improve it. I was hoping since you released it you would have a better understanding of it but it seems like its not the case…
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.
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.