From 51f6f2cc437e068e2fbf65b8bc78df1def40f36d Mon Sep 17 00:00:00 2001 From: xrtw <55210961+xrtw@users.noreply.github.com> Date: Tue, 7 Feb 2023 18:38:03 +0200 Subject: [PATCH] fix warning nuicallback fix fix --- [core]/esx_context/main.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/[core]/esx_context/main.lua b/[core]/esx_context/main.lua index 833b5464..55bfad9c 100644 --- a/[core]/esx_context/main.lua +++ b/[core]/esx_context/main.lua @@ -84,7 +84,7 @@ RegisterNUICallback("closed",function(data,cb) Closed() end) -RegisterNUICallback("selected",function(data) +RegisterNUICallback("selected",function(data,cb) if not activeMenu or not activeMenu.onSelect or not data.index @@ -102,9 +102,10 @@ RegisterNUICallback("selected",function(data) end activeMenu:onSelect(ele) + if cb then cb('ok') end end) -RegisterNUICallback("changed",function(data) +RegisterNUICallback("changed",function(data,cb) if not activeMenu or not data.index or not data.value @@ -136,6 +137,7 @@ RegisterNUICallback("changed",function(data) elseif ele.inputType == "radio" then ele.inputValue = data.value end + if cb then cb('ok') end end) -- Keybind