Skip to main content

GetPedMugshot

local mugshot, mugshotStr = ESX.Game.GetPedMugshot(ped)

This function generates a mugshot of the ped usable in various applications.

Argument

ArgumentData TypeOptionalDefault ValueExplanation
pedstringNo-The ped handle

Example

!!! warning Be sure to use UnregisterPedheadshot(mugshot) after using it, because the game only allows you 34 mugshots, and you won't be allowed to use mugshot once this limit is reached if you don't unregister it.

function Notify(msg)
local mugshot, mugshotStr = ESX.Game.GetPedMugshot(GetPlayerPed(-1))
ESX.ShowAdvancedNotification('Test', 'Testing!', msg, mugshotStr, 1)
UnregisterPedheadshot(mugshot)
end

Mugshot Example

Also See

ESX.ShowAdvancedNotification