Server Side Parameters Description
local value = HRLib.GetNUICallback(1, 'test')
local value2 = HRLib.GetNUICallback(1, 'test2')
print(value) -- Output: test
print(value2) -- Output: test2
Client Side Parameters Description
local value = HRLib.GetNUICallback('test')
local value2 = HRLib.GetNUICallback('test2')
print(value) -- Output: test
print(value2) -- Output: test2
const urlAdress = 'https://YourScriptName/lib:loadCallback';
let data = {
test: 'test',
test2: 'test2'
};
// vanillaJS
fetch(urlAdress, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
});
// jQuery
$.post(urlAdress, {}, null, 'json');