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]
openContextMenu = id
SetNuiFocus(true, true)
SendNUIMessage({
SendNuiMessage(json.encode({
action = 'showContext',
data = {
title = data.title,
menu = data.menu,
options = data.options
}
})
}, {sort_keys=true}))
end
function lib.registerContext(context)