Upon my journey into FiveM development / learning lua ive created a menu to spawn in addon cars / any cars. Make sure you have nativeUI installed! You can change the open menu button by gong to FiveM Game Reference Docs make sure its a valid INDEX. read the README.MD file! has everything you need to know in depth.
So the second item won’ show up for me. I tried to copy and paste some stuff or find any reason why it wouldn’t work. Maybe you can tell me how I can get the Second and maybe a third Menu Item to work.
So just to make sure i didn’t do anything wrong with me adding cars I reinstalled the resource. So its just plain downloaded from here and put in the folder, when pressing PageUp in game it opens the menu and only shows the first Item (in that case of your example is only TRUCKS) It never shows the second item. So your “SUVS” Item never shows.
This screenshot is right after installing the resource without changing anything in the files provided. Even though the code shows that there should be a second Menu option there is not.
FirstItem(mainMenu)
_menuPool:RefreshIndex()
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
_menuPool:ProcessMenus()
--[[ The "e" button will activate the menu ]]
if IsControlJustPressed(1, 10) then
mainMenu:Visible(not mainMenu:Visible())
end
end
end)
on line 75 you need to call the function of the suv’s which would be
FirstItem(mainMenu)
SecondItem(mainMenu)
_menuPool:RefreshIndex()
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
_menuPool:ProcessMenus()
--[[ The "e" button will activate the menu ]]
if IsControlJustPressed(1, 10) then
mainMenu:Visible(not mainMenu:Visible())
end
end
end)