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.

[SOLVED] Suspect in car not shoot at me while on pursuit

Featured Replies

I'm making new callout plugin, callout on 2 suspects in vehicle, armed passenger, but the passenger not shooting in can against me as expect. It shoot at me only after exit the vehicle.

 

These are my code (in Process()😞

 

if (!PursuitCreated)
{
    Pursuit = Functions.CreatePursuit();
    foreach (Ped suspect in Suspects)
        Functions.AddPedToPursuit(Pursuit, suspect);
    Functions.SetPursuitIsActiveForPlayer(Pursuit, true);
    PursuitCreated = true;

    Game.LocalPlayer.Character.RelationshipGroup = "COP";

    Game.SetRelationshipBetweenRelationshipGroups("ARMEDSUSPECTS", "COP", Relationship.Hate);
    Game.SetRelationshipBetweenRelationshipGroups("COP", "ARMEDSUSPECTS", Relationship.Hate);

    NativeFunction.CallByName<uint>("SET_PED_COMBAT_ATTRIBUTES", Suspects[1], 1 ,true);

    Suspects[1].Tasks.FightAgainst(Game.LocalPlayer.Character);
}

 

Suspects[1] is passenger, armed with this command: 

Suspects[1].Inventory.GiveNewWeapon("weapon_appistol", 100, true);

 

Do you have any solution for this? Thanks.

Edited by Gamingvt03
Solution solved

Still making LSPDFR plugin...

  • Author

Solution found, the reason is once you set a ped as pursuit target, it will override your settings and flee. So, I have set driver is pursuit target only, and it worked as expect.

 

Code:

if (!PursuitCreated)
{
    Game.LocalPlayer.Character.RelationshipGroup = "COP";

    Game.SetRelationshipBetweenRelationshipGroups("ARMEDSUSPECTS", "COP", Relationship.Hate);
    Game.SetRelationshipBetweenRelationshipGroups("COP", "ARMEDSUSPECTS", Relationship.Hate);

    Pursuit = Functions.CreatePursuit();
    Functions.AddPedToPursuit(Pursuit, Suspects[0]);

    for (int i = 0; i < Suspects.Count; i++)
    {
        NativeFunction.CallByName<uint>("SET_PED_COMBAT_ATTRIBUTES", Suspects[i], 1, true);
        Suspects[i].Tasks.FightAgainst(Game.LocalPlayer.Character);
    }

    Functions.SetPursuitIsActiveForPlayer(Pursuit, true);
    PursuitCreated = true;
}

 

I'm still looking for better another solution, because I think mine is not the best one

Still making LSPDFR plugin...

  • Author
8 hours ago, LMS said:

It might work by using GetPedPursuitAttributes and then modifying the fight chance for the suspect(s).

 

Thanks! I have included GetPedPursuitAttributes as you said and the solution below worked as expect.

 

if (!PursuitCreated)
{
    Game.LocalPlayer.Character.RelationshipGroup = "COP";

    Game.SetRelationshipBetweenRelationshipGroups("ARMEDSUSPECTS", "COP", Relationship.Hate);
    Game.SetRelationshipBetweenRelationshipGroups("COP", "ARMEDSUSPECTS", Relationship.Hate);

    Pursuit = Functions.CreatePursuit();

    for (int i = 0; i < Suspects.Count; i++)
    {
        Functions.AddPedToPursuit(Pursuit, Suspects[i]);
        Functions.GetPedPursuitAttributes(Suspects[i]).AverageFightTime = 0;
        NativeFunction.CallByName<uint>("SET_PED_COMBAT_ATTRIBUTES", Suspects[i], 1, true);
        Suspects[i].Tasks.FightAgainst(Game.LocalPlayer.Character);
    }

    Functions.SetPursuitIsActiveForPlayer(Pursuit, true);
    PursuitCreated = true;
}

Still making LSPDFR plugin...

  • The title was changed to [SOLVED] Suspect in car not shoot at me while on pursuit

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.