Jump to content

[SOLVED] How to get character's name?


Faya

Recommended Posts

I'm trying to figure out how to get the player's name but I can't really find it anywhere, LSPDFR Uses it in logging but I'm not sure if it's available in the API, if someone knows how to get it that would be great.

 

Persona.FromExistingPed just generates a random name.

 

(With character I don't mean model name, I mean the actual name the user gave the character.)

Edited by Faya

🇳🇱

Link to comment
Share on other sites

  • Management Team

You should use the LSPDFR API function GetPersonaForPed.

 

Calling Persona.FromExistingPed will always generate a new Persona and will never search the internal LSPDFR cache for an existing one.

I've looked at the code and Persona.FromExistingPed is really not supposed to be called on the player ped, by the looks of the code, it could corrupt the player ped Persona. I will try and confirm this with LMS.

Imitation is the sincerest form of flattery.

Link to comment
Share on other sites

1 hour ago, Cyan said:

You should use the LSPDFR API function GetPersonaForPed.

 

Calling Persona.FromExistingPed will always generate a new Persona and will never search the internal LSPDFR cache for an existing one.

I've looked at the code and Persona.FromExistingPed is really not supposed to be called on the player ped, by the looks of the code, it could corrupt the player ped Persona. I will try and confirm this with LMS.

 Thanks👍

🇳🇱

Link to comment
Share on other sites

  • The title was changed to [SOLVED] How to get character's name?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...