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.

Plugin not working in game

Featured Replies

Hey,

 

So I've followed quite a few guides on making a simple plugin. Followed all instructions and checked multiple times on correct code/structure.

 

I load up the game and forceduty to see if my plugin is working. I can see in the console that the plugin get's loaded but then throws up some errors that are related, I'm not entirely sure. I'm also unable to actually start the callout as It's not showing up. Below is my RPH Logs.

 

Quote
Spoiler

[2/16/2022 5:25:32 PM.260] LSPD First Response: [TRACE] Player went on duty.
[2/16/2022 5:25:32 PM.269] LSPD First Response: Folder is C:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto V\plugins\lspdfr
[2/16/2022 5:25:32 PM.326] LSPD First Response: ExamplePlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[2/16/2022 5:25:32 PM.360] LSPD First Response: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
[2/16/2022 5:25:32 PM.360] at System.Reflection.Assembly.GetTypes()
[2/16/2022 5:25:32 PM.360] at NTejdbcFZyvoUcpfMyHzsTELHujL.xduSSqkAfQjcGfDYvIThKKPvCkiqA() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 738
[2/16/2022 5:25:32 PM.360] LSPD First Response: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))
[2/16/2022 5:25:32 PM.361] LSPD First Response: Object reference not set to an instance of an object.   at NTejdbcFZyvoUcpfMyHzsTELHujL.gmzPRtorHUBVeEACjtriTpplCLcO(Object , ResolveEventArgs ) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 810
[2/16/2022 5:25:32 PM.361] at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
[2/16/2022 5:25:32 PM.361] LSPD First Response: Object reference not set to an instance of an object.   at NTejdbcFZyvoUcpfMyHzsTELHujL.gmzPRtorHUBVeEACjtriTpplCLcO(Object , ResolveEventArgs ) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 810
[2/16/2022 5:25:32 PM.361] at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
[2/16/2022 5:25:32 PM.361] LSPD First Response: We have 3 callouts registered
[2/16/2022 5:25:32 PM.361] LSPD First Response: CalloutManager initialized
[2/16/2022 5:25:32 PM.362] LSPD First Response: [TRACE] WorldEventManager: Allowing up to 1 events
[2/16/2022 5:25:32 PM.369] LSPD First Response: [TRACE] Created new evidence: CrimeEvidenceInPedPossession
[2/16/2022 5:25:32 PM.370] LSPD First Response: [TRACE] Created new evidence: CrimeEvidenceInPedPossession
[2/16/2022 5:25:32 PM.378] LSPD First Response: [INFO] Model preloading enabled
[2/16/2022 5:25:32 PM.378] LSPD First Response: [TRACE] Preloading POLICE
[2/16/2022 5:25:32 PM.378] LSPD First Response: [TRACE] Preloading POLICE2
[2/16/2022 5:25:32 PM.378] LSPD First Response: [TRACE] Preloading POLICE3
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading POLICET
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading SHERIFF2
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading SHERIFF
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading POLICE4
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading POLICEB
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading FBI2
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading POLICEOLD1
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading POLICEOLD2
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading BUZZARD
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading POLMAV
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading FROGGER2
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading AMBULANCE
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading FIRETRUK
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading asset 1B06D571
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading asset 1D073A89
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading asset 60EC506
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading asset 678B81B1
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading asset 3656C8C1
[2/16/2022 5:25:32 PM.379] LSPD First Response: [TRACE] Preloading asset 83BF0278
[2/16/2022 5:25:32 PM.386] LSPD First Response: [TRACE] Auto started component PersonaSearch #1
[2/16/2022 5:25:32 PM.387] LSPD First Response: [TRACE] Auto started component StudyStatistics #1
[2/16/2022 5:25:32 PM.388] LSPD First Response: [TRACE] Auto started component AmbientCharacterManager #1
[2/16/2022 5:25:32 PM.388] LSPD First Response: [TRACE] Auto started component AmbientEvidenceManager #1
[2/16/2022 5:25:32 PM.399] LSPD First Response: [TRACE] LifeCycleStage HomeOutside Start: 07:30:00 End: 00:00:00 does not have an end time defined, set to 08:00:00
[2/16/2022 5:25:32 PM.399] LSPD First Response: [TRACE] LifeCycleStage GoingToWork Start: 08:00:00 End: 00:00:00 does not have an end time defined, set to 09:00:00
[2/16/2022 5:25:32 PM.399] LSPD First Response: [TRACE] LifeCycleStage GoingHome Start: 13:00:00 End: 00:00:00 does not have an end time defined, set to 14:00:00
[2/16/2022 5:25:32 PM.399] LSPD First Response: [TRACE] LifeCycleStage HomeInside Start: 14:00:00 End: 00:00:00 does not have an end time defined, set to 07:30:00
[2/16/2022 5:25:32 PM.404] LSPD First Response: [TRACE] Auto started component PersistentCharacterManager #1
[2/16/2022 5:25:32 PM.404] LSPD First Response: [TRACE] Auto started component PlayerInvestigationManager #1
[2/16/2022 5:25:32 PM.404] LSPD First Response: [TRACE] Auto started component WorldPropManager #1
[2/16/2022 5:25:32 PM.406] LSPD First Response: [TRACE] Auto started component AmbientBehaviorPedOnStreet #1
[2/16/2022 5:25:32 PM.406] LSPD First Response: [TRACE] Auto started component AmbientBehaviorShotsFired #1
[2/16/2022 5:25:32 PM.407] LSPD First Response: [TRACE] Auto started component AmbientTrafficStop #1
[2/16/2022 5:25:32 PM.426] LSPD First Response: [TRACE] Thread AmbientTrafficStop #1 initialized
[2/16/2022 5:25:32 PM.434] LSPD First Response: [TRACE] Thread AmbientBehaviorShotsFired #1 initialized
[2/16/2022 5:25:32 PM.434] LSPD First Response: [TRACE] Thread AmbientBehaviorPedOnStreet #1 initialized
[2/16/2022 5:25:32 PM.434] LSPD First Response: [TRACE] Thread PersonaSearch #1 initialized
[2/16/2022 5:25:32 PM.440] LSPD First Response: [TRACE] Thread Ambient #1 initialized
[2/16/2022 5:25:32 PM.450] LSPD First Response: Deserialized Benjamin Drutman
[2/16/2022 5:25:32 PM.462] LSPD First Response: [TRACE] Thread ArrestManager #1 initialized
[2/16/2022 5:25:32 PM.464] LSPD First Response: [TRACE] Thread SuspectTransportManager #1 initialized
[2/16/2022 5:25:32 PM.470] LSPD First Response: [TRACE] Has taken study survey: False
[2/16/2022 5:25:32 PM.470] LSPD First Response: [TRACE] Thread WorldEventManager #1 initialized
[2/16/2022 5:25:32 PM.478] LSPD First Response: [TRACE] Thread BoundlessInformant #1 initialized
[2/16/2022 5:25:32 PM.479] LSPD First Response: [TRACE] Thread PlayerSuspectTransportManager #1 initialized
[2/16/2022 5:25:32 PM.486] LSPD First Response: [TRACE] Thread StudyStatistics #1 initialized
[2/16/2022 5:25:32 PM.486] LSPD First Response: [TRACE] Thread AmbientCharacterManager #1 initialized
[2/16/2022 5:25:32 PM.487] LSPD First Response: [TRACE] Thread AmbientEvidenceManager #1 initialized
[2/16/2022 5:25:32 PM.489] LSPD First Response: [TRACE] Thread PersistentCharacterManager #1 initialized
[2/16/2022 5:25:32 PM.489] LSPD First Response: [TRACE] Thread PlayerInvestigationManager #1 initialized
[2/16/2022 5:25:32 PM.490] LSPD First Response: [TRACE] Thread WorldPropManager #1 initialized
[2/16/2022 5:25:32 PM.506] LSPD First Response: [TRACE] Thread CrimesMenu #1 initialized
[2/16/2022 5:27:18 PM.317] LSPD First Response: [TRACE] Preloading POLICE3
[2/16/2022 5:27:18 PM.317] LSPD First Response: [TRACE] Preloading MP_M_FREEMODE_01
[2/16/2022 5:27:18 PM.337] LSPD First Response: [TRACE] Preloading POLICE3
[2/16/2022 5:27:18 PM.339] LSPD First Response: [TRACE] Created police3 at X:-66.59252 Y:-1364.179 Z:30.0698
[2/16/2022 5:27:18 PM.356] LSPD First Response: [TRACE] Preloading MP_M_FREEMODE_01
[2/16/2022 5:27:18 PM.362] LSPD First Response: [TRACE] New ped created mp_m_freemode_01 (PedType: 6), Agency: CityPolice ()
[2/16/2022 5:27:18 PM.396] LSPD First Response: [TRACE] Kared Miller (MP_M_FREEMODE_01) was set as a cop
[2/16/2022 5:27:18 PM.420] LSPD First Response: [TRACE] Preloading MP_M_FREEMODE_01
[2/16/2022 5:27:18 PM.426] LSPD First Response: [TRACE] New ped created mp_m_freemode_01 (PedType: 6), Agency: CityPolice ()
[2/16/2022 5:27:18 PM.432] LSPD First Response: [TRACE] Demarcus Williams (MP_M_FREEMODE_01) was set as a cop
[2/16/2022 5:27:18 PM.452] LSPD First Response: [TRACE] AmbientSpawn - spawned: police3
[2/16/2022 5:28:02 PM.784] LSPD First Response: [TRACE] Launching new encounter for Benjamin Drutman
[2/16/2022 5:28:02 PM.788] LSPD First Response: [TRACE] New stage is: CrimeStageEncounterInVehicle
[2/16/2022 5:28:02 PM.916] LSPD First Response: [TRACE] Spawned suspect vehicle
[2/16/2022 5:28:04 PM.963] LSPD First Response: [TRACE] It has been 47 seconds since the last callout
[2/16/2022 5:28:04 PM.970] LSPD First Response: Creating FhvARMtnxqlBMXMgSPNuKcRGwwkr from FhvARMtnxqlBMXMgSPNuKcRGwwkr, LSPD First Response, Version=0.4.8037.37597, Culture=neutral, PublicKeyToken=null
[2/16/2022 5:28:04 PM.976] LSPD First Response: [TRACE] Intitiliazed new HoldupLocation (Name: Vespucci Suburban, Interior: 169217)
[2/16/2022 5:28:04 PM.976] LSPD First Response: [TRACE] Intitiliazed new HoldupLocation (Name: Bob Mulet Salon, Interior: 165377)
[2/16/2022 5:28:04 PM.976] LSPD First Response: [TRACE] Intitiliazed new HoldupLocation (Name: Earl's Mini Mart, Interior: 199169)
[2/16/2022 5:28:04 PM.976] LSPD First Response: [TRACE] Intitiliazed new HoldupLocation (Name: Harmony 24/7 Market, Interior: 204801)
[2/16/2022 5:28:04 PM.976] LSPD First Response: [TRACE] Intitiliazed new HoldupLocation (Name: Vinewood 24/7 Market, Interior: 139777)
[2/16/2022 5:28:04 PM.976] LSPD First Response: [TRACE] Intitiliazed new HoldupLocation (Name: Little Seoul RON Station, Interior: 167937)
[2/16/2022 5:28:04 PM.976] LSPD First Response: [TRACE] Intitiliazed new HoldupLocation (Name: Strawberry 24/7 Market, Interior: 196865)
[2/16/2022 5:28:04 PM.976] LSPD First Response: [TRACE] Intitiliazed new HoldupLocation (Name: Braddock Pass Gas Station, Interior: 184065)
[2/16/2022 5:28:04 PM.976] LSPD First Response: [TRACE] Intitiliazed new HoldupLocation (Name: Mirror Park Gas Station, Interior: 155649)
[2/16/2022 5:28:05 PM.015] LSPD First Response: [TRACE] Preloading G_M_Y_KOREAN_01
[2/16/2022 5:28:05 PM.015] LSPD First Response: [TRACE] Preloading G_M_Y_KORLIEUT_01
[2/16/2022 5:28:05 PM.015] LSPD First Response: [TRACE] Preloading A_F_Y_BEVHILLS_02
[2/16/2022 5:28:05 PM.148] LSPD First Response: [TRACE] Callout created: Holdup #1
[2/16/2022 5:28:20 PM.368] LSPD First Response: [TRACE] Cleaning UI
[2/16/2022 5:29:11 PM.291] LSPD First Response: [TRACE] It has been 50 seconds since the last callout
[2/16/2022 5:29:11 PM.291] LSPD First Response: Creating IBuauNedmbmVEYLDmNmoYfNfCcVYA from IBuauNedmbmVEYLDmNmoYfNfCcVYA, LSPD First Response, Version=0.4.8037.37597, Culture=neutral, PublicKeyToken=null
[2/16/2022 5:29:11 PM.297] LSPD First Response: GetAudioFileForAction: No file found for: STREET_AUTOPIA_PKWY
[2/16/2022 5:29:11 PM.322] LSPD First Response: [TRACE] Preloading SABREGT
[2/16/2022 5:29:11 PM.322] LSPD First Response: [TRACE] Callout created: Pursuit #1
[2/16/2022 5:29:26 PM.349] LSPD First Response: [TRACE] Cleaning UI

 

 

 

 

Below is my plugin code. 

 

Main.cs = 

using LSPD_First_Response;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rage;
using Rage.Native;
using LSPD_First_Response.Mod.API;
using LSPD_First_Response.Mod.Callouts;
using LSPD_First_Response.Engine.Scripting.Entities;
using ExamplePlugin;

public class Main : Plugin
{
    //Initialization of the plugin.
    public override void Initialize()
    {
        //This is saying that when our OnDuty status is changed, it calls for the code to call private static void OnOnDutyStateChangedHandler near the bottom of this page.
        Functions.OnOnDutyStateChanged += OnOnDutyStateChangedHandler;

        //Game.LogTrivial's are used to help you identify problems when debugging a crash with your plugin, so you know exactly what's going on when.

        //This will show in the RagePluginHook.log as "Example Plugin 1.0.0.0 has been initialised." 
        Game.LogTrivial("Example Plugin " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + " has been initialised.");

        //This one will show in RagePluginHook.log as "Go on duty to fully load Example Plugin."
        Game.LogTrivial("Go on duty to fully load Example Plugin.");
    }
    //This is a simple message saying that Example Plugin has been cleanup.
    public override void Finally()
    {
        Game.LogTrivial("Example Plugin has been cleaned up.");
    }
    //This is called by Functions.OnOnDutyStateChanged as stated above, but only when bool OnDuty is true.
    private static void OnOnDutyStateChangedHandler(bool OnDuty)
    {
        //We have to make sure they are actually on duty so the code can do its work, so we use an "if" statement.
        if (OnDuty)
        {
            //This calls for the method private static void RegisterCallouts() down below.
            RegisterCallouts();

            //This shows a notification at the bottom left, above the minimap, of your screen when you go on duty, stating exactly what's in the quotation marks.
            Game.DisplayNotification("Example Plugin v1.0 has loaded successfully, thank you for downloading!");
        }
    }
    //This is the method that we called earlier in private static void OnOnDutyStateChangedHandler. This registers the callouts we have it setup to register, we'll come back to this after we make our callout.
    private static void RegisterCallouts()
    {
        Functions.RegisterCallout(typeof(ExamplePlugin.Callouts.PursuitinProgress));
    }
}

 

 

 

PursuitinProgress.cs = 

using System;
using Rage;
using Rage.Native;
using LSPD_First_Response.Mod.Callouts;
using LSPD_First_Response.Mod.API;
using LSPD_First_Response.Engine.Scripting.Entities;

//Identify where your Callouts folder is.
namespace ExamplePlugin.Callouts
{
    //Name the callout, and set the probability.
    [CalloutInfo("PursuitinProgress", CalloutProbability.VeryHigh)]

    //Let PursuitinProgress inherit the Callout class.
    public class PursuitinProgress : Callout
    {
        public LHandle pursuit;
        public Vector3 SpawnPoint;
        public Blip myBlip;
        public Ped mySuspect;
        public Vehicle myVehicle;

        public override bool OnBeforeCalloutDisplayed()
        {
            //Get a valid spawnpoint for the callout.
            SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(300f));

            //Create a list of VehicleModels to get them randomly generated.
            Model[] VehicleModels = new Model[]
            {
                "NINFEF2", "BUS", "COACH", "AIRBUS", "AMBULANCE", "BARRACKS", "BARRACKS2", "BALLER", "BALLER2", "BANSHEE", "BJXL", "BENSON", "BOBCATXL", "BUCCANEER", "BUFFALO", "BUFFALO2", "BULLDOZER", "BULLET", "BURRITO", "BURRITO2", "BURRITO3", "BURRITO4", "BURRITO5", "CAVALCADE", "CAVALCADE2", "POLICET", "GBURRITO", "CAMPER", "CARBONIZZARE", "CHEETAH", "COMET2", "COGCABRIO", "COQUETTE", "GRESLEY", "DUNE2", "HOTKNIFE", "DUBSTA", "DUBSTA2", "DUMP", "DOMINATOR", "EMPEROR", "EMPEROR2", "EMPEROR3", "ENTITYXF", "EXEMPLAR", "ELEGY2", "F620", "FBI", "FBI2", "FELON", "FELON2", "FELTZER2", "FIRETRUK", "FQ2", "FUGITIVE", "FUTO", "GRANGER", "GAUNTLET", "HABANERO", "INFERNUS", "INTRUDER", "JACKAL", "JOURNEY", "JB700", "KHAMELION", "LANDSTALKER", "MESA", "MESA2", "MESA3", "MIXER", "MINIVAN", "MIXER2", "MULE", "MULE2", "ORACLE", "ORACLE2", "MONROE", "PATRIOT", "PBUS", "PACKER", "PENUMBRA", "PEYOTE", "POLICE", "POLICE2", "POLICE3", "POLICE4", "PHANTOM", "PHOENIX", "PICADOR", "POUNDER", "PRANGER", "PRIMO", "RANCHERXL", "RANCHERXL2", "RAPIDGT", "RAPIDGT2", "RENTALBUS", "RUINER", "RIOT", "RIPLEY", "SABREGT", "SADLER", "SADLER2", "SANDKING", "SANDKING2", "SHERIFF", "SHERIFF2", "SPEEDO", "SPEEDO2", "STINGER", "STOCKADE", "STINGERGT", "SUPERD", "STRATUM", "SULTAN", "AKUMA", "PCJ", "FAGGIO2", "DAEMON", "BATI2"
            };

            //Choose a random vehicle model for myVehicle by using the models we listed above, and spawn it at SpawnPoint.
            myVehicle = new Vehicle(VehicleModels[new Random().Next(VehicleModels.Length)], SpawnPoint);

            //Set myVehicle as persistent, so it doesn't randomly disappear.
            myVehicle.IsPersistent = true;

            //Spawn mySuspect at SpawnPoint.
            mySuspect = new Ped(SpawnPoint);

            //Warp mySuspect into myVehicle, -1 represents the drivers seat.
            mySuspect.WarpIntoVehicle(myVehicle, -1);

            //Set mySuspect as persistent, so it doesn't randomly disappear.
            mySuspect.IsPersistent = true;

            //Block permanent events from mySuspect so they don't react weirdly to different things from GTA V.
            mySuspect.BlockPermanentEvents = true;

            //If for some reason, the spawning of mySuspect failed, don't display the callout.
            if (!mySuspect.Exists()) return false;

            //If the peds are valid, display the area that the callout is in.
            this.ShowCalloutAreaBlipBeforeAccepting(SpawnPoint, 15f);
            this.AddMinimumDistanceCheck(5f, SpawnPoint);

            //Set the callout message(displayed in the notification), and the position(also shown in the notification)
            this.CalloutMessage = "Pursuit in Progress";
            this.CalloutPosition = SpawnPoint;

            //Play the scanner audio using SpawnPoint to identify "POSITION" stated in "IN_OR_ON_POSITION". These audio files can be found in GTA V > LSPDFR > Police Scanner.
            Functions.PlayScannerAudioUsingPosition("OFFICERS_REPORT CRIME_RESIST_ARREST IN_OR_ON_POSITION", this.SpawnPoint);

            return base.OnBeforeCalloutDisplayed();
        }

        public override bool OnCalloutAccepted()
        {
            //Attach myBlip to mySuspect to show where they are.
            myBlip = mySuspect.AttachBlip();

            //Display a message to let the user know what to do.
            Game.DisplaySubtitle("Pursue the ~r~suspect~w~.", 7500);

            return base.OnCalloutAccepted();
        }

        public override void OnCalloutNotAccepted()
        {
            base.OnCalloutNotAccepted();

            //Clean up what we spawned earlier, since the player didn't accept the callout.

            //This states that if mySuspect exists, then we need to delete it.
            if (mySuspect.Exists()) mySuspect.Delete();

            //This states that if myBlip exists, then we need to delete it.
            if (myBlip.Exists()) myBlip.Delete();
        }

        public override void Process()
        {
            base.Process();
            {
                //This states that if the player is less than or equal to 100 meters away from SpawnPoint, then it will do whatever is in the brackets.
                if (Game.LocalPlayer.Character.Position.DistanceTo(SpawnPoint) <= 100f)
                {
                    //Create the pursuit.
                    this.pursuit = Functions.CreatePursuit();

                    //Add mySuspect to the pursuit.
                    Functions.AddPedToPursuit(this.pursuit, mySuspect);

                    //Request Backup for an air unit and one local unit to join into the pursuit.
                    Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.AirUnit);
                    Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.LocalUnit);
                }
            }
        }

        public override void End()
        {
            //Dismiss mySuspect, so it can be deleted by the game once the player leaves the scene.
            //Delete myBlip, so it doesn't stick around on the minimap annoying the player.

            //This states that if mySuspect exists, then we need to dismiss it.
            if (mySuspect.Exists()) mySuspect.Dismiss();

            //Delete the blip attached to mySuspect.
            if (myBlip.Exists()) myBlip.Delete();

            base.End();
        }
    }
}

 

 

Would appreciate it if somebody could give me some info as to what I'm doing wrong.

 

Thanks.

 

 

 

yo

  • Management Team

You are targeting .net 6.0.

You should target 4.7.2 or whatever RPH currently mentions.

 

[2/16/2022 5:25:32 PM.360] LSPD First Response: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))

Not related to your issue in any way, but I'd personally suggest moving your spawning of the suspect etc. into OnCalloutAccepted, rather than OnCalloutDisplayed.

Since that's when they are actually attending the call. 😄

 

Prefer support on Discord? Want your log automatically read? Join my server to receive live support!

https://discord.gg/SJfxcAhjCF

 

Developer of Callout Pack 686 Callouts & Discord Bot 686 Utilities.

 

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.