Jump to content

Setting vehicle owner name for Police Radio


Darkmyre

Recommended Posts

I'm trying to set the owner of a vehicle using the following code:

            Persona ownerPersona = Functions.GetPersonaForPed(owner);
            Game.LogTrivial("Owners name is " + ownerPersona.FullName);
            Functions.SetVehicleOwnerName(myVehicle, ownerPersona.FullName);
            string oName = Functions.GetVehicleOwnerName(myVehicle);
            Game.LogTrivial("Vehicle Owners name is " + oName);

According to the log, the name is being set correctly, yet whenever I run the plate with Police Radio I'm getting some other random name? Am I doing something wrong, or is it not possible to force a ped to own a vehicle with Police Radio? Running the plate via the normal LSPDFR radio returns the correct name, but most people use Police Radio so I'd prefer it to be compatible with both.

If it makes any difference, I'm spawning the owner outside the vehicle, warping them into it, then assigning them the Wander task for part of the callout. The name setting code above is being called after the ped is wandering, when the officer arrives on scene.

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

IIRC, Police Radio's registered owner isn't consistent with LSPDFR. It sometimes uses the driver of the vehicle or alters the owner in favour of a random event it created.

Edited by PieRGud
Link to comment
Share on other sites

  • 5 months later...
2 hours ago, LowRid3R said:

I´m now at the same problem... 

How do i make sure that PoliceRadio shows the same persona as i set within LSPDFR API ?

 

BR

It's not currently possible, but I believe @Albo1125 is working on updating police radio so it works like this.

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

Sometimes, unless it decided not to.

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

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