Hi all, This is something I’ve been working on all day and can’t seem to get my head around it. So I’m trying to make it so I could run /help and /rules in the same resource with it displaying a picture. The orginal resource is disclaimer. When ever I try and combine it, it says it has no NUI.
FILE REMOVED
there is only one picture in there but how could I make it so It could display both at each command?
RegisterCommand("help", function(source, args, rawCommand)
Citizen.CreateThread(function()
local display = true
local startTime = GetGameTimer()
local delay = 60000 -- ms
TriggerEvent('disclaimer:display', true)
while display do
Citizen.Wait(1)
if (GetTimeDifference(GetGameTimer(), startTime) > delay) then
display = false
TriggerEvent('disclaimer:display', false)
end
if (IsControlJustPressed(1, 51)) then
display = false
TriggerEvent('disclaimer:display', false)
end
end
end)
end)
RegisterNetEvent('disclaimer:display')
AddEventHandler('disclaimer:display', function(value)
SendNUIMessage({
type = "disclaimer",
display = value
})
end)
function ShowInfo(text, state)
SetTextComponentFormat("STRING")
AddTextComponentString(text)
DisplayHelpTextFromStringLabel(0, state, 0, -1)
end
try this ^^
also u didnt save the image as png lol its a photoshop file
I’m confused by exactly what you are asking. You want to be able to show different things, but just keep it in a single resource?
That’s easy. Just add a new div with a different id. Have different messages that get sent to the javascript, and show/hide each div based on whatever the values are.
I am trying with this script Join Logo / Image [1.1] create the blue alert command to activate or deactivate the image, but I cannot get any results, can you help me ? Thanks in advance.