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.

Creating LSPDFR Callouts

Featured Replies

Im brand new to coding and followed a tutorial on how to make lspdfr callouts on youtube. the guy was using visual studio 15 which is currently unavailable so im using 2017 and tried to follow along as best as i could however when i finished coding after 4 hours i have roughly 60 errors and have no idea what to do to fix them. Please help. Been up all night working on this so i might just be overlooking something. 

Main.cs:

 

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;


namespace AmazingCallouts
{
    public class Main: Plugin
    {

        public override void Initialize()
        {
            Functions.OnOnDutyStateChanged += OnOnDutyStateChangedHandler;
            Game.LogTrivial("Plugin AmazingCallouts" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + "by Chuy has been Initialized");
            Game.LogTrivial("Go on Duty to fully load Amazing callouts");

            AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(LSPDFRResolveEventHandler);
        }
        public override void Finally()
        {
            Game.LogTrivial("AmazingCallouts has been cleaned up");
        }
        private static void OnOnDutyStateChangedHandler(bool OnDuty)
        {
            if (OnDuty)
            {
                RegisterCallouts();
                Game.DisplayNotification("Your first callout has successfully loaded! Congrats and many more to come!");
            }
        }
        private static void RegisterCallouts()
        {
            Functions.RegisterCallout(typeof(Callouts.HighSpeedChase)); 
        }
        public static Assembly LSPDFRResolveEventHandler(object sender, ResolveEventArgs args)
        {
            foreach (Assembly assembly in Functions.GetAllUserPlugins())
            {
                if (args.Name.ToLower().Contains(assembly.GetName().Name.ToLower()))
                {
                    return assembly;
                }

                return null 
                    }

                public static bool IsLSPDFRPluginRunning(string Plugin, Version minversion = null)
                {
                    foreach(Assembly assembly in Functions.GetAllUserPlugins())
                    {
                        AssemblyName an = assembly.GetName();
                        if(minversion == null || an.Version.CompareTo(minversion) > = 0)
                        {
                            return true;
                        
                        }
                    }
                }
                return false;
            
        }
    }
}
 

High Speed Pursuit :

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 AmazingCallouts.Callouts
{
    [CalloutInfo ("HighSpeedChase", CalloutProbability.High)]

    public class HighSpeedChase : Callout 
    {
        private Ped Suspect;
        private Vehicle SuspectVehicle;
        private Blip SuspectBlip;
        private LHandle Pursuit;
        private Vector3 Spawnpoint;
        private bool PursuitCreated;
    }
    public override bool OnBeforeCalloutDisplayed ()
    {
        Spawnpoint = World.GetRandomPositionOnStreet();
        ShowCalloutAreaBlipBeforeAccepting(Spawnpoint, 30f);
        AddMinimunDistanceCheck(30f, Spawnpoint);
        CalloutMessage = "your callout is working correctly!";
        CalloutPosition = Spawnpoint;

        Functions.PlayScannerAudioUsingPosition("WE_HAVE CRIME_RESISITING_ARREST_02 IN_OR_ON_POSITION", Spawnpoint);
        return base.OnBeforeCalloutDisplayed();                 
    }
    public override bool OnCalloutAccepted()
    {
        suspectVehicle = new Vehicle("", Spawnpoint);
        SuspectVehicle.IsPersistent = true;
        suspect = new Ped(SuspectVehicle.GetOffsetPositionFront(5f));

        suspect.IsPersistent = true;
        suspect.BlockPerminentEvents = true;
        Suspect.WarpIntoVehicle(SuspectVehicle, -1);
        SuspectBlip = Suspect.AttachBlip();
        SuspectBlip.Color = System.Drawing.Color.Yellow;
        SuspectBlip.IsRouteEnables = true;
        PursuitCreated = false;
        return base.OnCalloutAccepted();

    }
    public override void Process()
    {
        base.Process;

        if(!PursuitCreated && Game.LocalPlayer.Character.DistanceTo(SuspectVehicle) <=20f)
        {
            PedPursuitAttributes = Functions.CreatePursuit();
            Functions.AddPedToPursuit(pursuit.Suspect);
            Functions.SetPursuitIsActiveForPlayer(pursuit, true);      
        }
        if (PursuitCreated && !Functioning.IsPursuitStillRunning(Pursuit))
        {
            End();
        }
        if(suspect.Exists())
        {
            suspect.Dismiss();
        
        }
        if(SuspectBlip.Exists())
        {
            SuspectBlip.delete();
        }
        if (SuspectVehicle.Exists())
        {
            SuspectVehicle.Dismiss();

        }
        Game.LogTrivial("Amazing callouts - High Speed Chase cleaned up."); 
    }
}
 

 

 

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.