Jump to content
Salzian

Cop not escorting ped after arrest

Recommended Posts

So I made my first small custom callout and everything is working fine. It's a pursuit with a vehicle. However one thing that bothers me is, that after the arrest of the driver, the arresting officer is not able to escort the person to his car. It looks like the ped starts walking, the cop looses grip, regraps the ped and repeat. After a few tries the ped manages to free himself, gets into his vehicle and drives of as if nothing had happened.

 

I already tried clearing the peds tasks on callout end but still same behaviour.

End() looks like this

 

public override void End()
        {
            foreach (Ped criminal in criminals.Where(criminal => criminal.Exists()))
            {
                criminal.Tasks.Clear();
                criminal.Dismiss();
                Log($"Dismissed criminal {criminal.GetHashCode()}");
            }

            Log($"Callout {GetType().Name} ended");
            base.End();
        }


So nothing super special that could interfere. What am I missing?

Share this post


Link to post
Share on other sites

That looks fine to me, could you perhaps post a more complete source code example? Also is there anything in the log file that looks like a cop failing to arrest?


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

Share this post


Link to post
Share on other sites

Nothing that looks suspicious to me from the code. I guess I'll try running it locally and see if I get the same, but that might take a few days. If you do find the issue in the meantime, please let me know here.


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

Share this post


Link to post
Share on other sites
3 minutes ago, LMS said:

Nothing that looks suspicious to me from the code. I guess I'll try running it locally and see if I get the same, but that might take a few days. If you do find the issue in the meantime, please let me know here.

Sure. I haven't done something too fancy I think so I'm either overlooking something or caused a bug of some sort. If you need anything else, let me know.

Share this post


Link to post
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...