Skip to main content

ShowAdvancedNotification

ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)

This function shows an advanced notification.

Arguments

ArgumentData TypeOptionalDefault ValueExplanation
senderstringNo-Message header
subjectstringNo-Message subject
msgstringNo-Message content
textureDictstringNo-Texture directory, see Texture Directory for accepted values
iconTypenumberNo-Icon type, see Icon Types for accepted values
flashbooleanYesfalseFlash the notification?
savetoBreifbooleanYestrueSave to breif? Located in Pause Menu > Help
hudColorIndexnumberYesnilThe background color, see https://gyazo.com/68bd384455fceb0a85a8729e48216e15 for available colors

Example

function notification(msg)
local mugshot, mugshotStr = ESX.Game.GetPedMugshot(PlayerPedId())
ESX.ShowAdvancedNotification('title', 'subject', 'msg', mugshotStr, 1)
UnregisterPedheadshot(mugshot)
end

Advanced Notification Example Picture

Texture Directory

To specify an texture directory you can either simply parse an already existing notification image, or you can for example create a player mugshot with ESX.

Icon Types

Icon TypeExplantation
1Chat Box
2Email
3Add Friend Request
7Right Jumping Arrow
8RP Icon
9$ Icon