fix(client/context): Ensure is ordered correctly

Previously the menu items would be randomly ordered, now they are the order you wrote them to be in.
This commit is contained in:
Luke
2022-04-16 11:48:24 +02:00
parent 66694c4ce3
commit caa0b8284f

View File

@@ -6,14 +6,14 @@ function lib.showContext(id)
local data = contextMenus[id] local data = contextMenus[id]
openContextMenu = id openContextMenu = id
SetNuiFocus(true, true) SetNuiFocus(true, true)
SendNUIMessage({ SendNuiMessage(json.encode({
action = 'showContext', action = 'showContext',
data = { data = {
title = data.title, title = data.title,
menu = data.menu, menu = data.menu,
options = data.options options = data.options
} }
}) }, {sort_keys=true}))
end end
function lib.registerContext(context) function lib.registerContext(context)