[Help | Lua] Icon-Notifications in FiveM

Hey everyone,
Im currently trying to figure out how to create these kind of notifications in Lua :
notification

It would be nice if someone could help me out with this !
Thanks in advance,

  • Kolopsel
2 Likes

It’s called something like DisplayPictureNotification

1 Like

I cant find it. Ive been searching around the NativeDB

1 Like

Your looking in the wrong place. Go to “FiveM App Data/citizen/scripting/lua/natives_METAVERSION.lua”

I make an event (client side) for this on my server:

-- Display Advanced Notification 
RegisterNetEvent("YTBase:Notify_Advanced")
AddEventHandler("YTBase:Notify_Advanced", function(icon, type, sender, title, text)
    Citizen.CreateThread(function()
        Wait(1)
        SetNotificationTextEntry("STRING")
        AddTextComponentString(text)
        SetNotificationMessage(icon, icon, true, type, sender, title, text)
        DrawNotification(false, true)
        Citizen.Wait(60000)
    end)
end)
2 Likes

Are you wanting to customise these or do a weather forecast notification like this?

Got it working, thank you all for helping me !

1 Like

The weather forecast notification was just meant to be an example

So what do you want it for, advertisements?

1 Like

Guys, how can i make automatic weather detection for notification?

How you fixed it? Im having the same issue it doesnt pop up.

Sorry i dont remember how exactly i fixed it back then, but i suggest you download this script and look at it.

What exactly do I need to type on the icon (Like URL for icon or so) and for the type?