I’m trying to open NUI from (for example) nui_nui script in script_open script.
Is that possible to callback nui in quite diffrent script?
Sorry for my bad english
I’m trying to open NUI from (for example) nui_nui script in script_open script.
Is that possible to callback nui in quite diffrent script?
Sorry for my bad english
In your NUI Script… If you create an Event with your NUI Message like this.
RegisterNetEvent('nui_nui:CallNUI')
AddEventHandler('nui_nui:CallNUI', function()
SendNUIMessage({
action = "gg",
})
end)
And then from the other script you just call with a TriggerEvent!
Client Side:
TriggerEvent('nui_nui:CallNUI')
Server Side:
TriggerClientEvent('nui_nui:CallNUI', source)
Hope this solved your issue.
I’ve got citizen thread ONLY, and i can’t write more events, threads or anything.
Citizen.CreateThread(function()
while true do
Wait(0)
if IsControlJustPressed(1, 212) then
SetNuiFocus(true, true)
SendNUIMessage({type = 'open', players = getPlayers()})
end
end
end)
How can i call this?
Same problem here
on the request place nui://nui_nui/REQUEST