My current code:
generated by chatgpt, not sure if this would work, but could someone give me one that works?
Code
--menu constants
local mainMenu = "Mod Menu"
local addCodeHere = "Add your code here."
--main function
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlPressed(0, 246) then
ClearMenu()
--local player menu
local playerSubmenu = addSubMenu("Local Player", mainMenu)
--leo shit menu
local leoSubmenu = addSubMenu("LEO Shit", mainMenu, {r = 400, g = 0, b = 0})
--add the code here
addButton(addCodeHere, leoSubmenu, function()
--insert code here
end)
--display the menu
drawMenu(mainMenu)
end
end
end)
--functions
function addButton(title, parentMenu, action)
Citizen.InvokeNative(0xD6054686D3659F28, parentMenu, "button", title, action)
end
function drawMenu(title)
Citizen.InvokeNative(0x07C837F9A01C264B, 0, title)
end
function addSubMenu(title, parentMenu, color)
if color then
return Citizen.InvokeNative(0x2735233DD116D111, parentMenu, "submenu", title, "~r~", color.r or 255, color.g or 255, color.b or 255)
else
return Citizen.InvokeNative(0x2735233DD116D111, parentMenu, "submenu", title)
end
end
Display More