Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cant make arrested Peds stay in car for transport

Featured Replies

Spoiler


I have an issue with arrested peds, that is meant to be transported in my car.
In Base-game opening backdoor is broken, so i made my own feature
It works for random Peds from the street, but not for arrested Peds. They do get in the car, but they will emediately step out, even though they are disabled in code:
                            if (arrestee != null)
                            {

                                //Same relations-group
                                //arrestee.RelationshipGroup = "carUser";
                                //Game.LocalPlayer.Character.RelationshipGroup = "carUser"; NO
                                //make friends / like/ respect? NO
                                arrestee.RelationshipGroup = "caught";
                                Game.LocalPlayer.Character.RelationshipGroup = "catcher";
                                Game.SetRelationshipBetweenRelationshipGroups(

                                "caught", "catcher", Relationship.Respect);//Mutual relations!
                                Game.SetRelationshipBetweenRelationshipGroups(

                                "catcher", "caught", Relationship.Respect);
                                arrestee.WarpIntoVehicle(EmergencyVehicle, 1);
                                //arrestee.Tasks.EnterVehicle(EmergencyVehicle, 1);
                                if (arrestee.IsInVehicle(EmergencyVehicle, true))
                                {
                                    Game.DisplayNotification("is in vehicle is true");
                                    if (arrestee.SeatIndex == 1)//Never get here!
                                    {
                                        //arrestee.Tasks.Pause(-1);
                                        Game.DisplayNotification("sits on seat 1");
                                        arrestee.BlockPermanentEvents = true;//stop all actions
                                        arrestee.Tasks.Pause(11111);


As the code shows i have tried to have both player and arrested Ped:
* in the same relationship-group. Does not work.
* In 2 different relationship-groups that
** are neutral
** respect
** Like
-Each other. Does not work. The arrested Ped leaves the car
Tasks.EnterVehicle(EmergencyVehicle.. Makes arrested Ped take one step in direction of car, then stop
Warping does place the arrested Ped on the chosen seat.

I get every debug-respons meaning that the arrested Ped IS programmed to take a 11111 ms long pause from any task, and that all Permanent-Events should be blocked. Still arrested Ped leaves the car.
I can button mash method button and multi-implement the warping-in, then drive off.
The arrested Ped wont jump out of the moving car, but if i stop, the arrested Ped jumps out.
I suspect that the arrested Ped are issued a escape-cmd over and over, and that this loop-cmd overrules my event-block as well as the 11111ms pause.
How can i make sure the arrested Ped stays in my car untill i toss him out?
Are there some way to 'overrule' the game-tick cmd to escape?
Or does another set of behavioural-flags need to changed?

(The other way to make this is to make the backseat 'pleasent' for the peds.
If they did not felt scared-off by the backseat, then they would sit i guess..
but how..)

 

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

  • Author

an update for this problem.
I have made an ugly 'solution' with warp of a kneeling ped.
The strange thing is that a ped in kneeling-state does not leave the car!
The approach has 2 major drawbacks.
* It looks stupid that the ped disappear when warped

* The ped does not sit at the seat, but rather kneels at the cars floor, and the car look empty. Looking down angled, it is possible to see the ped crumpled down on the car-floor. That also looks stupid..
The upside of this is that it is possible to transport peds in own car, witch makes the default callout : Apprehend wanted suspect.. possible to respond to.
It is actually a very limited benefit for all that hazzle 😕
My next idea is to make the ped kneel after it has entered the car, still i am confused that the ped get reset by the game-loop, and that having peds in friendly relationship groups wont change the behaviour -at all..
Wonder if there is a way to list all settings of an Entity. That could be interesting.

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

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

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.