Jump to content

[Solved] Remove Suspect Blip when Lost Visual?


OJS

Recommended Posts

Hello, everyone. I am trying to iron out a few bugs in my callouts plugin. One of which is a bug where if you lose visual of the suspect LSPDFR will attempt to make it where the suspect is no longer visible on the mini map, but for my callouts plugin the blip stays there. Here is what I've tried.

 

Added this in the void Process():

            // EXPERIMENTAL //
            if (Functions.IsPedVisualLost(p_Suspect))
            {
                if (SuspectBlip.Exists())
                {
                    SuspectBlip.Delete(); // Deletes the blip when the player loses the suspect.
                }
            }

            if (p_Suspect.IsOnScreen || !Functions.IsPedVisualLost(p_Suspect))
            {
                if (!SuspectBlip.Exists())
                {
                    SuspectBlip = p_Suspect.AttachBlip(); // Attaches blip to the suspect.
                    SuspectBlip.IsFriendly = false; // Suspect is not friendly.
                }
            }
            // END EXPERIMENTAL //

Any help would be gladly appreciated, thanks!

Edited by OfficerJohnnyShumway
The question has been solved. I updated the title.
Link to comment
Share on other sites

  • Management Team

Out of curiosity: Why are you even attaching a blip to the suspect yourself? LSPDFR will do that automatically.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

 

3 minutes ago, LMS said:

Out of curiosity: Why are you even attaching a blip to the suspect yourself? LSPDFR will do that automatically.

Well I didn't know that. I was taught to attach the blip in "bool OnCalloutAccepted()" and I've done it ever since.

Edited by OfficerJohnnyShumway
Correction/Update
Link to comment
Share on other sites

  • Management Team

I do not recall if that might have been necessary for very very old LSPDFR versions, but you definitely do not need to do it now. Does that solve your problem or are you working on something else?

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

1 minute ago, LMS said:

I do not recall if that might have been necessary for very very old LSPDFR versions, but you definitely do not need to do it now. Does that solve your problem or are you working on something else?

Hold on, brb

Link to comment
Share on other sites

29 minutes ago, LMS said:

I do not recall if that might have been necessary for very very old LSPDFR versions, but you definitely do not need to do it now. Does that solve your problem or are you working on something else?

Okay so it kind of works, but the blip somehow disappeared from the map even though I was right behind the suspect?

Link to comment
Share on other sites

  • Management Team

That certainly should not happen. It should start to flash for a bit first (indicating losing visual) and then disappear if not regained.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

1 hour ago, LMS said:

That certainly should not happen. It should start to flash for a bit first (indicating losing visual) and then disappear if not regained.

I'll check it again a few more times. Thanks for the help!

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