I want to document this here since it could be of use to other people and for myself to look at later on if I forget.
The natives we will be using are:
First of all, what is a ped headshot? It's basically a picture or "mugshot" of the ped that you can use for various things. An example of this is shown in the pause menu.
I will be using ScriptHookVDotNet/C# for examples.
First you want to get the handle of the pedheadshot by calling REGISTER_PEDHEADSHOT and then the first and only argument will be the ped.
int handle = Function.Call<int>(Hash.REGISTER_PEDHEADSHOT, Game.Player.Character);
Next you want to wait a few seconds such as Script.Wait(5000); for the game to register and create a texture for it or you can use these functions and just pass the handle as the only argument:
Then, you want to get the string/name of the texture or TXD by using GET_PEDHEADSHOT_TXD_STRING and the handle from the one we registered earlier.
string txdString = Function.Call<string>(Hash.GET_PEDHEADSHOT_TXD_STRING, handle);
Once you have the name of the texture you are good to go! You can use it for a variety of things such as notifications and drawing textures of the ped.
I hope this helps someone out!