Jump to content

Callouts


Giovanny881

Recommended Posts

Hello can anybody help me

 

GTaV can find my plugin when i press enter this message com on my screen

 

ERROR: Could not load plugin from "C: \ Program Files (x86) \ Steam \ steamapps \ common \ Grand Theft Auto V \ Plugins \ firstpursuit.dll". Can not load one or more of the requested types. Get the LoaderExceptions property for more information.

Link to comment
Share on other sites

1. It is easier for us to help you if you provide code of your Main or EntryPoint

2. If it is a LSPDFR callout it should be placed in GTAV\Plugins\lspdfr\xxx.dll else you can get faster help in the ragepluginhook discord

 

greeting juan

Edited by epicmrjuan

Thank you

Link to comment
Share on other sites

thanks for the message 

 

 

 

 

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 AdvancedHookManaged;
[assembly: Rage.Attributes.Plugin("pursuitGtav", Description = "pursuitGTAV.", Author = "GioJamie")]
namespace pursuitGTAV.Callouts
{
    public static class Entrypoint
    {

    }
    [CalloutInfo("stolenVehicle", CalloutProbability.High)]
    public class Stolenvehicle : Callout
    {
        private Ped suspect;
        private Vehicle Suspectvehicle;
        private Vector3 Spawnpoint;
        private Blip suspectblip;
        private LHandle Pursuit;
        private bool Pursuitcreated = false;

        public override bool OnBeforeCalloutDisplayed()
        {
            Spawnpoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(350f));

            ShowCalloutAreaBlipBeforeAccepting(Spawnpoint, 35f);
            AddMinimumDistanceCheck(35f, Spawnpoint);

            CalloutMessage = "StolenCar";
            CalloutPosition = Spawnpoint;

            Functions.PlayScannerAudioUsingPosition("We_HAVE Crime_STOLEN_CAR IN_OR_ON_POSITION", Spawnpoint);                                
            
            return base.OnBeforeCalloutDisplayed();
        }

        public override bool OnCalloutAccepted()
        {
            Suspectvehicle = new Vehicle("SULTANRS", Spawnpoint);
            Suspectvehicle.IsPersistent = true;

            suspect = Suspectvehicle.CreateRandomDriver();
            suspect.IsPersistent = true;
            suspect.BlockPermanentEvents = true;

            suspectblip = suspect.AttachBlip();
            suspectblip.IsFriendly = false;

            suspect.Tasks.CruiseWithVehicle(25f, VehicleDrivingFlags.Emergency);
            return base.OnCalloutAccepted();
        }

        public override void Process()
        {

            base.Process();
            if (!Pursuitcreated && Game.LocalPlayer.Character.DistanceTo(suspect.Position) < 35f)
            {
                Pursuit = Functions.CreatePursuit();
                Functions.AddPedToPursuit(Pursuit, suspect);
                Functions.SetPursuitIsActiveForPlayer(Pursuit, true);
                Pursuitcreated = true;
            }

            if (Pursuitcreated && !Functions.IsPursuitStillRunning(Pursuit))
            {
                End();
            }
        }
        public override void End()
        {
            base.End(); 
            if (suspect.Exists()) { suspect.Dismiss(); }
            if (Suspectvehicle.Exists()) { Suspectvehicle.Dismiss(); }
            if (suspectblip.Exists()) { suspectblip.Delete(); }
        }
    }
}

I AM a beginner so i dont need some help 

Edited by Giovanny881
spelling
Link to comment
Share on other sites

NL:

Hey, ik zou je aanraden om te beginnen albo's Guides te lezen:

https://github.com/LMSDev/LSPDFR-API/blob/master/API Documentation/Guide to using the LSPDFR API and Documentation - Albo1125.pdf

Bijberhorende bestanden:

https://github.com/LMSDev/LSPDFR-API/tree/master/API Examples/Albo1125-LSPDFR-API-Guide-Final-Project

 

Hier zul je redelijk ver mee komen, als je nog hulp nodig hebt na dat je het hebt gelezen wil ik je graag verder helpen.

 

 

EN:

Hey, first off i would recommend you read albo1125 guide for the api:

https://github.com/LMSDev/LSPDFR-API/blob/master/API Documentation/Guide to using the LSPDFR API and Documentation - Albo1125.pdf

Code:

https://github.com/LMSDev/LSPDFR-API/tree/master/API Examples/Albo1125-LSPDFR-API-Guide-Final-Project

 

This will get you quite far, if you need any further assistance after you have read/watched the documentation/video don't be afraid to ask

 

greetings juan

 

EDIT:

TL;DR van het probleem is dat je je callouts laad als een plugin i.p.v. Lspdfr die de callouts laad.

 

Also video:

 

Edited by epicmrjuan

Thank you

Link to comment
Share on other sites

thanks for reply:smile::smile:  ik heb nog een vraag ik heb alles gedaan wat hij ook deed maar als ik m wil doorverwijzen om mijn callout te registreren vind ie m niet en komt er een spellingsfout   

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LSPD_First_Response.Mod.API;
using LSPD_First_Response.Mod.Callouts;
using Rage;
namespace LSPDFRFirst
{
    public class Main : Plugin
    {
        public override void Initialize()
        {
            Functions.OnOnDutyStateChanged += OnOndutyStateCHangeHandler;
            Game.LogTrivial("plugin LSPDFR_API_GUIDE." + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + "By Officer Gio Has been initialised");
            Game.LogTrivial("Go on duty to fully load LSPDFR_API_GUIDE.");
        }
        public override void Finally()
        {
            Game.LogTrivial("LSPDFR_API_GUIDE has been cleaned up.");
        }
        private static void OnOndutyStateCHangeHandler(bool Onduty)
        {
            if (Onduty)
            {
                RegisterCallouts();
            }
        }
        private static void RegisterCallouts()
        {
            Functions.RegisterCallout(typeof(Callouts.stolenvehicle));
        }
    }
}
 
 
 
 
ik heb de fout dikgedrukt 
Link to comment
Share on other sites

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

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...