Jump to content

[Fixed]


Deactivated Member

Recommended Posts

48 minutes ago, WildJam said:

I searched every folder and i can't find any dll file (My plugin is called just "Plugin") Do i have save it or something? I have some errors, if this can be by this tell me i will sent u photos.

 

what dll did you mean? is it the reference for visual studio?

you have to "add reference" in visual studio to add the dll as your project library.

Link to comment
Share on other sites

14 hours ago, Wilhelm said:

 

Sorry but this video doesn't help me.

14 hours ago, Pazzi said:

 

what dll did you mean? is it the reference for visual studio?

you have to "add reference" in visual studio to add the dll as your project library.

i have added a refrences, LSPDFR and Ragepluginhook sdk. I have some errors:

https://imgur.com/a/WqLTMdQ

Link to comment
Share on other sites

1 hour ago, WildJam said:

i have added a refrences, LSPDFR and Ragepluginhook sdk. I have some errors:

https://imgur.com/a/WqLTMdQ

 

Ok, you're going to struggle writing a plugin called Plugin. The reason for this is that "Plugin" is already a class, which represents the actual RPH plugin. However, because you've named your plugin "Plugin" your compiler is thinking that you're referencing a namespace (like a file path).

 

From this, I would really recommend reading up on C# some more because you'll continue to struggle without some fundamental knowledge of the language (trust me I'm a software developer).

 

https://csharp.net-tutorials.com/getting-started/introduction/

https://dotnetcademy.net/CSharp/Beginner

 

You need to understand object-orientated programming, including abstract classes, before you can really get elbow deep in this.

Please quote or @Wilhelm me in threads if you're wanting my attention/response!

Link to comment
Share on other sites

1 hour ago, Wilhelm said:

 

Ok, you're going to struggle writing a plugin called Plugin. The reason for this is that "Plugin" is already a class, which represents the actual RPH plugin. However, because you've named your plugin "Plugin" your compiler is thinking that you're referencing a namespace (like a file path).

 

From this, I would really recommend reading up on C# some more because you'll continue to struggle without some fundamental knowledge of the language (trust me I'm a software developer).

 

https://csharp.net-tutorials.com/getting-started/introduction/

https://dotnetcademy.net/CSharp/Beginner

 

You need to understand object-orientated programming, including abstract classes, before you can really get elbow deep in this.

Okay thanks, i repaired these errors. But(that's not my computer's faulth) When i accepting my callout, occur black screens and other crazy graphic glitches, how i can repair it?

 

My callout script - https://imgur.com/a/050fq8F

Main.cs script - https://imgur.com/a/HNoEzij

Link to comment
Share on other sites

53 minutes ago, WildJam said:

Okay thanks, i repaired these errors. But(that's not my computer's faulth) When i accepting my callout, occur black screens and other crazy graphic glitches, how i can repair it?

 

My callout script - https://imgur.com/a/050fq8F

Main.cs script - https://imgur.com/a/HNoEzij

 

I don't think there's anything obvious shown in your screenshots. Its best if you check through your logs and you'll be able to tell where it's getting stuck/causing issues.

Please quote or @Wilhelm me in threads if you're wanting my attention/response!

Link to comment
Share on other sites

On 2/11/2019 at 1:21 PM, Wilhelm said:

 

I don't think there's anything obvious shown in your screenshots. Its best if you check through your logs and you'll be able to tell where it's getting stuck/causing issues.

I recorded video, how its looks. u can see, when i am  near the suspect, my computer is laggy. After i catch him, there is not lags

-  

 

 

If u want to see it on your computer, i can give u my plugin files.

 

Can u tell me how to set amount of back up? Idk how and there is 50-100 police units.

 

My script for back up:

 

Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.LocalUnit);

Edited by WildJam
Link to comment
Share on other sites

Have you fixed this? If not, the reason is probably because the Process() function will loop until you assert the completion of it. So likely what's happening is its added the ped to a pursuit over and over whenever you're within 100f of it.

Please quote or @Wilhelm me in threads if you're wanting my attention/response!

Link to comment
Share on other sites

12 hours ago, Wilhelm said:

Have you fixed this? If not, the reason is probably because the Process() function will loop until you assert the completion of it. So likely what's happening is its added the ped to a pursuit over and over whenever you're within 100f of it.

yea, i fixed it, i will delete this topic beacuse this is kind of spam, i have already created 3 topics but i dont know how to delete it, and thanks for your help.

 

            with what i need help is:

  • how to make passangers in the car
  • how to make callout created when only near the area of spawnpoint
Edited by WildJam
Link to comment
Share on other sites

29 minutes ago, WildJam said:
  • how to make passangers in the car

I believe this answered your question in this thread: https://www.lcpdfr.com/forums/topic/89258-stolen-vehicle-callout-but-with-more-peds-in-it/

 

30 minutes ago, WildJam said:
  • how to make callout created when only near the area of spawnpoint

You'll have to have a play around with this and see what you can get it to do.

 

Like I said before, you'll need to make sure you've got a good grip on C# (do check out those tutorials, I get the sense that you're struggling with the basic syntax and structure of C# and you'll really benefit from learning some of it properly).

Please quote or @Wilhelm me in threads if you're wanting my attention/response!

Link to comment
Share on other sites

2 hours ago, Wilhelm said:

I believe this answered your question in this thread: https://www.lcpdfr.com/forums/topic/89258-stolen-vehicle-callout-but-with-more-peds-in-it/

 

You'll have to have a play around with this and see what you can get it to do.

 

Like I said before, you'll need to make sure you've got a good grip on C# (do check out those tutorials, I get the sense that you're struggling with the basic syntax and structure of C# and you'll really benefit from learning some of it properly).

Yes somebody answered it, but its doesn't works. And after Reading beginner tutorials i still cant do anything, what i need now is how to make shooting peds from car and how to make passangers, if i Will know it i can already make Callout plugin, but i cant find anywhere this. 

Edited by WildJam
Link to comment
Share on other sites

  • 2 weeks later...
On 2/12/2019 at 11:53 AM, Wilhelm said:

I believe this answered your question in this thread: https://www.lcpdfr.com/forums/topic/89258-stolen-vehicle-callout-but-with-more-peds-in-it/

 

You'll have to have a play around with this and see what you can get it to do.

 

Like I said before, you'll need to make sure you've got a good grip on C# (do check out those tutorials, I get the sense that you're struggling with the basic syntax and structure of C# and you'll really benefit from learning some of it properly).

Hello, I have very big problem, and nobody wants to help me. So i created callout, when i have to search for the ped, so a search area blip only appears, when i found(im close) the ped, ped's blip won't appears, but when i delete search area blip code, blip appears.

 

My code:

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

namespace CALLOUTPACKNAME.Callouts
{
    [CalloutInfo("CalloutName", CalloutProbability.VeryLow)]
    public class CalloutNameSpace : Callout
    {
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Vector3 AreaBlip;
        private Vector3 SearchAreaLocation;
        private Vector3 Route;
        private Vector3 SpawnPoint0;
        private Vector3 SpawnPoint1;
        private Vector3 SpawnPoint2;
        private Vector3 SpawnPoint3;
        private Vector3 SpawnPoint4;
        private Vector3 SpawnPoint5;
        private Vector3 SpawnPoint6;
        private Vector3 SpawnPoint7;
        private Vector3 SpawnPoint8;
        private Vector3 SpawnPoint9;
        private Vector3 SpawnPoint10;
        private Vector3 SpawnPoint11;
        private Vector3 SpawnPoint12;
        private Vector3 SpawnPoint13;
        private Vector3 SpawnPoint14;
        private Vector3 SpawnPoint15;
        private Blip SearchAreaBlip;
        private Blip Waypoint;
        private Blip SuspectBlip;

        public override bool OnBeforeCalloutDisplayed()
        {

            AreaBlip = new Vector3(-427.577f, 1116.049f, 326.783f);
            Route = new Vector3(-427.577f, 1116.049f, 326.783f);
            SearchAreaLocation = new Vector3(-427.577f, 1116.049f, 326.783f);
            SpawnPoint0 = new Vector3(-427.577f, 1116.049f, 326.783f);
            SpawnPoint1 = new Vector3(-397.247f, 1127.590f, 322.724f);
            SpawnPoint2 = new Vector3(-428.174f, 1122.083f, 325.854f);
            SpawnPoint3 = new Vector3(454.413f, -740.819f, 27.358f);
            SpawnPoint4 = new Vector3(459.643f, -759.451f, 27.358f);
            SpawnPoint5 = new Vector3(452.857f, -779.992f, 27.358f);
            SpawnPoint6 = new Vector3(460.017f, -809.125f, 27.322f);
            SpawnPoint7 = new Vector3(478.739f, -700.984f, 32.051f);
            SpawnPoint8 = new Vector3(480.516f, -747.916f, 37.396f);
            SpawnPoint9 = new Vector3(476.067f, -804.597f, 42.672f);
            SpawnPoint10 = new Vector3(466.171f, -779.360f, 32.459f);
            SpawnPoint11 = new Vector3(430.765f, -711.007f, 35.727f);
            SpawnPoint12 = new Vector3(449.468f, -725.472f, 35.987f);
            SpawnPoint13 = new Vector3(447.883f, -755.353f, 38.004f);
            SpawnPoint14 = new Vector3(449.329f, -780.423f, 44.531f);
            SpawnPoint15 = new Vector3(433.665f, -806.423f, 38.013f);
            ShowCalloutAreaBlipBeforeAccepting(AreaBlip, 50f); AddMinimumDistanceCheck(40f, AreaBlip);
            CalloutMessage = "Callout Name"; CalloutPosition = AreaBlip;
          
            return base.OnBeforeCalloutDisplayed();
        }


        public override bool OnCalloutAccepted()
        {
            Functions.PlayScannerAudio("RESPOND_CODE_3");

            myPed = new Ped("a_m_m_og_boss_01", SpawnPoint0, 0f);
            myPed.IsPersistent = true;
            myPed.BlockPermanentEvents = true;

            Suspect = new Ped("a_m_m_og_boss_01", SpawnPoint1, 0f);
            Suspect.IsPersistent = true;
            Suspect.BlockPermanentEvents = true;

            Waypoint = new Blip(Route);
            Waypoint.Color = (Color.Yellow);
            Waypoint.EnableRoute(Color.Yellow);

            return base.OnCalloutAccepted();
        }

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

                if (Game.LocalPlayer.Character.DistanceTo(Suspect.Position) < 5f)
                {
                    SuspectBlip = Suspect.AttachBlip();
                    SuspectBlip.IsFriendly = false;
                    SuspectBlip.Scale = 0.75f;
                }

                if (Game.LocalPlayer.Character.DistanceTo(myPed.Position) < 80f)
                {
                    SearchAreaBlip = new Blip(SearchAreaLocation, 80f);
                    SearchAreaBlip.Color = Color.Yellow;
                    SearchAreaBlip.Alpha = 0.5f;
                }

                if (Game.LocalPlayer.Character.DistanceTo(myPed.Position) < 80f)
                {
                    Waypoint.Delete();
                    Waypoint.DisableRoute();
                }

        }

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

Please help me, Im waiting.

 

thanks.

Link to comment
Share on other sites

15 hours ago, WildJam said:

Hello, I have very big problem, and nobody wants to help me. So i created callout, when i have to search for the ped, so a search area blip only appears, when i found(im close) the ped, ped's blip won't appears, but when i delete search area blip code, blip appears.

 

My code:


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

namespace CALLOUTPACKNAME.Callouts
{
    [CalloutInfo("CalloutName", CalloutProbability.VeryLow)]
    public class CalloutNameSpace : Callout
    {
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Ped myPed;
        private Vector3 AreaBlip;
        private Vector3 SearchAreaLocation;
        private Vector3 Route;
        private Vector3 SpawnPoint0;
        private Vector3 SpawnPoint1;
        private Vector3 SpawnPoint2;
        private Vector3 SpawnPoint3;
        private Vector3 SpawnPoint4;
        private Vector3 SpawnPoint5;
        private Vector3 SpawnPoint6;
        private Vector3 SpawnPoint7;
        private Vector3 SpawnPoint8;
        private Vector3 SpawnPoint9;
        private Vector3 SpawnPoint10;
        private Vector3 SpawnPoint11;
        private Vector3 SpawnPoint12;
        private Vector3 SpawnPoint13;
        private Vector3 SpawnPoint14;
        private Vector3 SpawnPoint15;
        private Blip SearchAreaBlip;
        private Blip Waypoint;
        private Blip SuspectBlip;

        public override bool OnBeforeCalloutDisplayed()
        {

            AreaBlip = new Vector3(-427.577f, 1116.049f, 326.783f);
            Route = new Vector3(-427.577f, 1116.049f, 326.783f);
            SearchAreaLocation = new Vector3(-427.577f, 1116.049f, 326.783f);
            SpawnPoint0 = new Vector3(-427.577f, 1116.049f, 326.783f);
            SpawnPoint1 = new Vector3(-397.247f, 1127.590f, 322.724f);
            SpawnPoint2 = new Vector3(-428.174f, 1122.083f, 325.854f);
            SpawnPoint3 = new Vector3(454.413f, -740.819f, 27.358f);
            SpawnPoint4 = new Vector3(459.643f, -759.451f, 27.358f);
            SpawnPoint5 = new Vector3(452.857f, -779.992f, 27.358f);
            SpawnPoint6 = new Vector3(460.017f, -809.125f, 27.322f);
            SpawnPoint7 = new Vector3(478.739f, -700.984f, 32.051f);
            SpawnPoint8 = new Vector3(480.516f, -747.916f, 37.396f);
            SpawnPoint9 = new Vector3(476.067f, -804.597f, 42.672f);
            SpawnPoint10 = new Vector3(466.171f, -779.360f, 32.459f);
            SpawnPoint11 = new Vector3(430.765f, -711.007f, 35.727f);
            SpawnPoint12 = new Vector3(449.468f, -725.472f, 35.987f);
            SpawnPoint13 = new Vector3(447.883f, -755.353f, 38.004f);
            SpawnPoint14 = new Vector3(449.329f, -780.423f, 44.531f);
            SpawnPoint15 = new Vector3(433.665f, -806.423f, 38.013f);
            ShowCalloutAreaBlipBeforeAccepting(AreaBlip, 50f); AddMinimumDistanceCheck(40f, AreaBlip);
            CalloutMessage = "Callout Name"; CalloutPosition = AreaBlip;
          
            return base.OnBeforeCalloutDisplayed();
        }


        public override bool OnCalloutAccepted()
        {
            Functions.PlayScannerAudio("RESPOND_CODE_3");

            myPed = new Ped("a_m_m_og_boss_01", SpawnPoint0, 0f);
            myPed.IsPersistent = true;
            myPed.BlockPermanentEvents = true;

            Suspect = new Ped("a_m_m_og_boss_01", SpawnPoint1, 0f);
            Suspect.IsPersistent = true;
            Suspect.BlockPermanentEvents = true;

            Waypoint = new Blip(Route);
            Waypoint.Color = (Color.Yellow);
            Waypoint.EnableRoute(Color.Yellow);

            return base.OnCalloutAccepted();
        }

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

                if (Game.LocalPlayer.Character.DistanceTo(Suspect.Position) < 5f)
                {
                    SuspectBlip = Suspect.AttachBlip();
                    SuspectBlip.IsFriendly = false;
                    SuspectBlip.Scale = 0.75f;
                }

                if (Game.LocalPlayer.Character.DistanceTo(myPed.Position) < 80f)
                {
                    SearchAreaBlip = new Blip(SearchAreaLocation, 80f);
                    SearchAreaBlip.Color = Color.Yellow;
                    SearchAreaBlip.Alpha = 0.5f;
                }

                if (Game.LocalPlayer.Character.DistanceTo(myPed.Position) < 80f)
                {
                    Waypoint.Delete();
                    Waypoint.DisableRoute();
                }

        }

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

Please help me, Im waiting.

 

thanks.

 

I don't think you've gone and looked at the tutorial I linked to you. Honestly dude, you need to have that base knowledge, and knowledge of object scopes before you can really do this. Your issue, I think (and I haven't checked because I'm at work), is that in Process() your last two if statements do the same thing. You just need to flip the last operator around to make it work. Also, you've declared so many peds with the name "myPed" I'm honestly surprised that this builds.

 

Looking at the way that you've written that if statement, its not going to work like you want it to, even if you change the operator.

  • Consider that if the player is 4f away. This means that the first block will trigger and attach the blip, set is not friendly, and set the scale.
  • But then, it will also trigger the next block, because 4f is less than 80f, right? So this will basically change the blip again, running it through the second block.

 

You should be using an if-elseif-else structure here, which is honestly one of the base fundamentals of any programming language. I apologise if it feels like I'm coming across as harsh, but you can't do this unless you are familiar with C# and how objects work and such. Even with these changes above, I think this will likely still throw errors with various different issues.

Please quote or @Wilhelm me in threads if you're wanting my attention/response!

Link to comment
Share on other sites

 

4 hours ago, Wilhelm said:

 

I don't think you've gone and looked at the tutorial I linked to you. Honestly dude, you need to have that base knowledge, and knowledge of object scopes before you can really do this. Your issue, I think (and I haven't checked because I'm at work), is that in Process() your last two if statements do the same thing. You just need to flip the last operator around to make it work. Also, you've declared so many peds with the name "myPed" I'm honestly surprised that this builds.

 

Looking at the way that you've written that if statement, its not going to work like you want it to, even if you change the operator.

  • Consider that if the player is 4f away. This means that the first block will trigger and attach the blip, set is not friendly, and set the scale.
  • But then, it will also trigger the next block, because 4f is less than 80f, right? So this will basically change the blip again, running it through the second block.

 

You should be using an if-elseif-else structure here, which is honestly one of the base fundamentals of any programming language. I apologise if it feels like I'm coming across as harsh, but you can't do this unless you are familiar with C# and how objects work and such. Even with these changes above, I think this will likely still throw errors with various different issues.

Big thanks. And peds isn't called myPed in my script, i just renamed it here.

 

 

and not, u are not crude. U are nice guy, thanks for every help from u. U really helped me 🙂

Edited by WildJam
Link to comment
Share on other sites

23 hours ago, WildJam said:

Hello, I have very big problem, and nobody wants to help me. So i created callout, when i have to search for the ped, so a search area blip only appears, when i found(im close) the ped, ped's blip won't appears, but when i delete search area blip code, blip appears.

obv. look at how you're looping everything.

I recommend that you do as Wilhelm said and learn c# before you get started and get answers that won't get you anywhere.

Edited by NoNameSet
Link to comment
Share on other sites

12 minutes ago, NoNameSet said:

obv. look at how you're looping everything.

I recommend that you do as Wilhelm said and learn c# before you get started and get answers that won't get you anywhere.

i learned C#, i told a lot times, i have readed tutorials and watch videos. And i know about looping.  And why people can't asks beacuse they dont learned C#,

or maybe they just can't find it, or understand it??????

 

 

 

 

Edited by WildJam
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...