From caa0b8284fccfe5f5e7813b9dc196b85c00277f9 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 16 Apr 2022 11:48:24 +0200 Subject: [PATCH] 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. --- resource/interface/client/context.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resource/interface/client/context.lua b/resource/interface/client/context.lua index 03910ff28..a558d077a 100644 --- a/resource/interface/client/context.lua +++ b/resource/interface/client/context.lua @@ -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)