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.

So im creating my plugin

Featured Replies

Hi, I assume you are using Callout Manager to start your Callout, I myself had problems with Callout Manager when I created my callout and my solution was to remove Callout Manager and use the StartCallout command in the Rage terminal, if you don't see your callout after the "StartCallout" it would mean that your callout is badly registered if so, I would like you to share your 'Main' of your code. Thanks

by Mytical.

42 minutes ago, TheLastKnight2310 said:

Hello mate thanks for the responce i the plugins working fine now and everything is fixed with that issue but i am currently getting a disregarded call when i accept the actuall callout could you possibly take a look for me?

test.txt 2.86 kB · 0 downloads

For sure, can i have the ragepluginhook.log just after you crash please ?

44 minutes ago, TheLastKnight2310 said:

Hello mate thanks for the responce i the plugins working fine now and everything is fixed with that issue but i am currently getting a disregarded call when i accept the actuall callout could you possibly take a look for me?

test.txt 2.86 kB · 0 downloads

It look like the same code from here LSPDFR Callout Modding Guide - Google Docs

Did you follow this guide ?

Tips : If you need to include code here you can use the spoiler thing and then "<>" on the menu like this (and then select C#) :

(Do not hesitate to quote me in your comment so I get a notification)

Spoiler
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 System.Drawing;

namespace Dangerous_Callouts.Callouts
{
    [CalloutInfo("HighSpeed Pursuit", CalloutProbability.VeryHigh)]
    public class HighSpeedPursuit : Callout
    {
        private Ped Suspect;
        private Vehicle SuspectVehicle;
        private Blip SuspectBlip;
        private Vector3 SpawnPoint;
        private bool PursuitCreated;
        private LHandle Pursuit;

        public override bool OnBeforeCalloutDisplayed()
        {
            SpawnPoint = World.GetRandomPositionOnStreet();
            ShowCalloutAreaBlipBeforeAccepting(SpawnPoint, 50f);
            AddMinimumDistanceCheck(5f, SpawnPoint);
            AddMaximumDistanceCheck(600f, SpawnPoint);
            CalloutMessage = "Pursuit in Progress";
            CalloutPosition = SpawnPoint;
            Functions.PlayScannerAudioUsingPosition("OFFICERS_REPORT CRIME_RESIST_ARREST IN_OR_ON_POSITION", SpawnPoint);

            return base.OnBeforeCalloutDisplayed();
        }

        public override bool OnCalloutAccepted()
        {

            SuspectVehicle = new Vehicle("BALLER", SpawnPoint);
            SuspectVehicle.IsPersistent = true;

            Suspect = new Ped(SuspectVehicle.GetOffsetPositionFront(5f));
            Suspect.IsPersistent = true;
            Suspect.BlockPermanentEvents = true;
            Suspect.WarpIntoVehicle(SuspectVehicle, -1);
            Suspect.Inventory.GiveNewWeapon("WEAPON_PISTOL", 500, true);

            SuspectBlip = Suspect.AttachBlip();
            SuspectBlip.Color = System.Drawing.Color.DarkGreen;
            SuspectBlip.IsRouteEnabled = true;

            return base.OnCalloutAccepted();
        }
        public override void Process()
        {
            base.Process();
            if (Game.LocalPlayer.Character.Position.DistanceTo(SpawnPoint) <= 100f && !PursuitCreated)
            {
                Pursuit = Functions.CreatePursuit();
                Functions.AddPedToPursuit(Pursuit, Suspect);
                Functions.SetPursuitIsActiveForPlayer(Pursuit, Suspect);
                PursuitCreated = true;
            }

            if (Game.LocalPlayer.Character.IsDead || Suspect.IsDead || Suspect.IsCuffed)
            {
                End();
            }
        }

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

            Game.LogTrivial("Dangerous Callout highSpeedPutsuit has been cleaned up!");
        }
    }
}

 

 

by Mytical.

59 minutes ago, TheLastKnight2310 said:

Hello mate thanks for the responce i the plugins working fine now and everything is fixed with that issue but i am currently getting a disregarded call when i accept the actuall callout could you possibly take a look for me?

test.txt 2.86 kB · 1 download

I don't know if it that who make you crash but try to replace 

SuspectBlip.Color = System.Drawing.Color.DarkGreen;  by SuspectBlip.Color = Color.DarkGreen;

If you need to just change one things in your code do not reload all GTA, your can juste do "ReloadAllPlugin" and "ForceDuty" for reloading all your plugin.

Edited by Mytical49
forgot

by Mytical.

5 minutes ago, TheLastKnight2310 said:

i do do that i dont reload my whole game

yea mate it wasnt that its not crashing my game now its just Disregarding the call so when i accept it, it just disregards it

Can you post the RagePluginHook.log please ?

by Mytical.

3 minutes ago, TheLastKnight2310 said:

In the code you put: (you forgot the "_01")

Functions.PlayScannerAudioUsingPosition("OFFICERS_REPORT CRIME_RESIST_ARREST IN_OR_ON_POSITION", SpawnPoint);

but it have to be :

Functions.PlayScannerAudioUsingPosition("OFFICERS_REPORT_01 CRIME_RESIST_ARREST_01 IN_OR_ON_POSITION", SpawnPoint);

by Mytical.

Because the guide you follow doesn't work or is outdated so you need to remove CalloutInterface because CalloutInterface will show your the callout even if he is not  registred.

1- Delete CalloutInterface from your plugin

2- Re open GTA

3-After LSPDFR and other plugin are initialized go on Duty

4- type  StartCallout Dangerous_Callouts in the Rage terminal (F4)

5-Tell me if the command work or not

6- Send here the Main.cs here

7- Verify you write CRIME_RESIST_ARREST_02 and not CRIME_RESISTING_ARREST_02 

8-Verify your audio file : lspdfr/audio/scanner and search for "CRIME_RESIST_ARREST_02"

by Mytical.

  • Author
13 hours ago, Mytical49 said:

Because the guide you follow doesn't work or is outdated so you need to remove CalloutInterface because CalloutInterface will show your the callout even if he is not  registred.

1- Delete CalloutInterface from your plugin

2- Re open GTA

3-After LSPDFR and other plugin are initialized go on Duty

4- type  StartCallout Dangerous_Callouts in the Rage terminal (F4)

5-Tell me if the command work or not

6- Send here the Main.cs here

7- Verify you write CRIME_RESIST_ARREST_02 and not CRIME_RESISTING_ARREST_02 

8-Verify your audio file : lspdfr/audio/scanner and search for "CRIME_RESIST_ARREST_02"

Hello mate thanks for all of the help i got both the Callouts working and The CalloutPack is working fine im gonna release it 🙂

 

LFennell

5 minutes ago, TheLastKnight2310 said:

Hello mate thanks for all of the help i got both the Callouts working and The CalloutPack is working fine im gonna release it 🙂

 

No problem glad I could help you 🙂

by Mytical.

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.