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.

Ped Stuck in Arrest Animation

Featured Replies

Hi there,

In my Callout Plugin I have a Ped who is fight against me.

But when I will arrest them it stucks in a unusual way like this: http://sendvid.com/kmpv1jdu

 

Can anyone help me pls?

 

My Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Rage;
using LSPD_First_Response.Mod.API;
using LSPD_First_Response.Mod.Callouts;
using LSPD_First_Response.Engine.Scripting.Entities;
using System.Drawing;
using System.Threading;

namespace HotCallouts.Callouts
{
    [CalloutInfo("PersonWithAKnife", CalloutProbability.Medium)]
    class PersonWithAKnife : Callout
    {

        private Ped Suspect;
        private Vector3 SpawnPoint;
        private Blip SuspectBlip;

        public override bool OnBeforeCalloutDisplayed()
        {

            SpawnPoint = new Vector3(-(609f), -(388f), 34f);

            ShowCalloutAreaBlipBeforeAccepting(SpawnPoint, 40f);
            AddMinimumDistanceCheck(10f, SpawnPoint);

            CalloutMessage = "Person with a Knife";
            CalloutPosition = SpawnPoint;

            Functions.PlayScannerAudioUsingPosition("CITIZENS_REPORT CRIME_PERSONCARRYINGKNIFE IN_OR_ON_POSITION UNITS_RESPOND_CODE_02", SpawnPoint);

            return base.OnBeforeCalloutDisplayed();
        }

        public override bool OnCalloutAccepted()
        {

            Suspect = new Ped(SpawnPoint);
            Suspect.IsPersistent = true;
            Suspect.Inventory.GiveNewWeapon("WEAPON_KNIFE", 1, true);
            Suspect.RandomizeVariation();
            Suspect.CanAttackFriendlies = true;
            Suspect.BlockPermanentEvents = true;
            Suspect.RelationshipGroup = "RED";

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

            Game.SetRelationshipBetweenRelationshipGroups("RED", "BLUE", Relationship.Hate);
            Game.SetRelationshipBetweenRelationshipGroups("BLUE", "RED", Relationship.Hate);

            SuspectBlip = Suspect.AttachBlip();
            SuspectBlip.Color = Color.Yellow;
            SuspectBlip.EnableRoute(Color.Yellow);

            return base.OnCalloutAccepted();
        }

        public override void Process()
        {
            base.Process();
            
            switch (Game.LocalPlayer.Character.Position.DistanceTo(Suspect.Position) < 30)
            {
                case true:
                Game.DisplayNotification("True");
                Suspect.Tasks.FightAgainstClosestHatedTarget(50);
                break;

                case false:
                Game.DisplayNotification("False");
                Suspect.Tasks.Wander().WaitForCompletion();
                break;
            }

            if (Suspect.IsDead || Suspect.IsCuffed)
            {
                Functions.PlayScannerAudio("WE_ARE_CODE FOUR NO_FURTHER_UNITS_REQUIRED");
                End();
            }
        }

        public override void End()
        {
            base.End();
            if (Suspect.Exists()) { Suspect.Dismiss(); }
            if (SuspectBlip.Exists()) { SuspectBlip.Delete(); }
        }

    }
}

 

Willkommen

 

Website: SimuNews

You're looping the ped's tasks in process.

Edited by NoNameSet

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

Similar Content

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.