Jump to content

Getting persona data through LSPDFR computer w/o ped


Fiskey111

Recommended Posts

Hi guys!

Just curious if its possible to access the LSPDFR name database without a Ped, similar to typing in the name in the computer.  I'd like to add this to the MDT, if it's not possible I can just generate a list and make it pull random first/last names & DOBs.

Thanks!

 

 

Link to comment
Share on other sites

using LSPD_First_Response.Engine.Scripting.Entities;
	String fullname = Persona.GetRandomFullName();

My YouTube Channel: Darkmyre Gaming (Australian LSPDFR patrols, plugins in development, and other games)

My Discord Server | AusGamer Network

 

Please do not PM me for technical support or bug reports, use the appropriate forum or plugin's comments instead.

Link to comment
Share on other sites

If you know a ped with that name exists, you can do something like this (syntax off the top of my head):

foreach (Ped ped in World.GetAllPeds()) 
{
	if (ped.Exists()) {

		Persona pers = Functions.GetPersonaForPed(ped);
		if (pers.FullName == NameUserEntered) 
		{
			return pers;
		}
	}
}

I use something similar for my British Policing Script and I think the LSPDFR computer uses a similar method to this as well.

Edited by Albo1125

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

7 hours ago, Darkmyre said:

 


using LSPD_First_Response.Engine.Scripting.Entities;
	String fullname = Persona.GetRandomFullName();

 

I never knew this existed!!! Thank you!!!

2 hours ago, Albo1125 said:

If you know a ped with that name exists, you can do something like this (syntax off the top of my head):


foreach (Ped ped in World.GetAllPeds()) 
{
	if (ped.Exists()) {

		Persona pers = Functions.GetPersonaForPed(ped);
		if (pers.FullName == NameUserEntered) 
		{
			return pers;
		}
	}
}

I use something similar for my British Policing Script and I think the LSPDFR computer uses a similar method to this as well.

Ahhhh okay, so that would return the info for that specific ped the person had stopped then, just like the LSPDFR computer?  That makes sense!  Thank you!

 

 

Link to comment
Share on other sites

  • 5 months later...

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...