Jump to content

Faya

Members
  • Posts

    147
  • Joined

  • Last visited

  • Days Won

    3

 Content Type 

Forums

Gallery

Downloads

Tutorials

News Stories

Wiki

Community Guidelines

LSPDFR BOLO Series

GTA5 Native Database

GTA5 Native Parameters

Release Highlights

LSPDFR Mod Showcase

LML User Contributions

Posts posted by Faya

  1. I'm assuming you already have created a search area, but if you haven't yet, click the spoiler.

    Spoiler
    SearchArea = new Blip(SpawnPoint.Position, 60f);
    SearchArea.Alpha = 0.5f;
    SearchArea.Color = Color.FromArgb(240, 200, 80);
    SearchArea.EnableRoute(Color.FromArgb(240, 200, 80));

    The first line instantiates a new blip, the first parameter requires a location(Vector3), the second parameter requires a radius, to set the size of the SearchArea.

    Alpha means transparancy, default is 1f. So I've set it to half as that.

    240, 200, 80 is RGB; And the color is yellow.

    EnableRoute means that it sets a waypoint to the blip(the blip is SearchArea).

     

    Please check out this for the proper coloring of things:

    Standardization of API Plugin Colors.

     

    Okay, so first you want to create a private bool to check if it needs any refreshing, I will explain why later. Don't forget to set it to true.

    private bool needsRefreshing = true;

     

    Second, we're making an if-statement, we don't need to add "== true" since we already set true by default, normally it's always false.

    if (Suspect.Position.DistanceTo(SpawnPoint) > 60f && needsRefreshing)

    It checks if the suspect's position is further then the search area size, and if it still needs to be refreshed(which it does).

     

    Now for the rest of the if-statement: the red parts describe what that line executes.

    if (Suspect.Position.DistanceTo(SpawnPoint) > 60f && needsRefreshing)
    {
       if (SearchArea.Exists()) { SearchArea.Delete(); } // Checks if SearchArea is still there, then it deletes it.
       SceneLocation = Suspect.Position.Around(10f, 30f); //Sets the SpawnPoint to a random position between 10 and 30, since the SpawnPoint is of no more use.
       SearchArea = new Blip(SpawnPoint, 60f);
       SearchArea.Alpha = 0.5f; // Sets the transparancy to half of the standard size.
       SearchArea.Color = Color.FromArgb(240, 200, 80); // Sets the color to yellow.
    }

     

    We're not done yet, We still have to make a second if-statement to check where the player is.

    if (Game.LocalPlayer.Character.Position.DistanceTo(Suspect.Position) < 10f && needsRefreshing) // Executes when the player is close to the suspect and if it needs refreshing.
    {
        while (true) // keeps executing while true
        {
            needsRefreshing = false; // Since the player found the Suspect, we don't need to refresh the SearchArea anymore, because that would be weird.
            if (SearchArea.Exists()) { SearchArea.Delete(); } // This is the old SearchArea, since the suspect is not in it anymore, it needs to be deleted.
            Game.LogTrivial("TutorialPlugin: Search Area doesn't need to be refreshed anymore."); // This is optional, but i do recommend you log things alot.
            break; // This stops the while loop from executing anymore, otherwise it is going to do this 1000x per second.
        }
    }

     

    If you need any support with coding, head over to "VincentsGM Modifications" Discord server, he helped me alot and there is alot of things you can learn in his #coding-help channel.

    Server:

    https://discord.gg/A7pJNY3HM5

    Make sure to get the Developer role for you to see #coding-help.

  2. On 10/22/2021 at 11:51 AM, PTurtle said:

    Anyone know how to make a ped blow up or spawn an explosion on the ped? I am making a man with a grenade callout and that is kinda important

    image.png.28e6d9476626608dcb46a6ca3c1a23a4.png

    There currently isn't any explode method available in RagePluginHookSDK, only vehicles; However it'll likely be in ScriptHookVDotNet.dll 

  3. Xinput is from DirectX(don't touch that)

     

    1) Are only a few lights always on even when it's supposed to be off?

    if that's the case you need to install/update ScriptHookV and ScriptHookVDotNet

     

    2) Double check the VCF name(Grand Theft Auto V\ELS\pack_default) with the model name.

    Spoiler

    ScriptHookV:

    http://dev-c.com/gtav/scripthookv/

     

    ScriptHookVDotNet:(Only .DLLs are fine)

     https://github.com/crosire/scripthookvdotnet/releases

     

  4. I just bought a new Mission Row police department, but i'm developing my own Garage & Armory & Locker script. but now the garage blip is standing out in a weird way, also the locker blip.

     

    I edited the Stations.xml with other coordinates and also just tried removing the whole line, i also tried custom folder along with a LSPDFR reinstallation.

     

    I need to have those blips gone or atleast relocated(which i've both tried), does anyone have a solution?

     

    image.png.2f0293e539dedc57c2536bd01414af98.pngimage.png.1db11c5b0e04537d67300554cccad5e7.png

  5. I was just testing one of my callouts, it was about a humane labs shipment being stolen, it started at GWC Golf club.

    Now that doesn't make sense because what would he be doing there, another scenario is a domestic violence call in the LA Sewers haha.

     

    It's probably not worth the time, but i don't know if it's hard to add.

     

    public override bool OnBeforeCalloutDisplayed()
    {
        ExcludeCalloutLocations("Alta", "GWC Golf Club");
        #other stuff
    }

     

    and then you can add infinite locations if you want to.

  6. i'm confused between the 2, with mininumDistance i mean:                                                                         ⬇️Minimum distance.

    SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(300, 800));

     

    and:

    AddMinimumDistanceCheck(20f, SpawnPoint);

    Never changed AddMinimumDistanceCheck since i found no reason to do so for it.

  7. Have like the most recognized police vehicles/textures in a filter in the downloads page.(USA, UK, Germany, Netherlands, France, Belgium, Spain, more..

    This is a win-win situation, if you're searching for like a police vehicle in spain, you don't see Dutch(Netherlands) vehicles, and if you put the filter on US, you don't see Spain or Germany.

    Yeah you could just search "Polizei, Policia or Politie." but some vehicles have like "2007 Blabla seeds lol" but it's harder to find those in your countries.

  8. Setting aiming type to "Free Aim" doesn't work, already tried. This is the LSPDFR Intimidate mode, not cop holster.

    Is anyone able to quickly draw their weapon, it works for me, but when i'm in front of a ped, it just snaps to him and there i am ready to fight this dude with my hands while he's got a pistol.

     

    The reason enabling free aim doesn't work for fists is you would be trying to punch him 99% of the time.(I'm still unarmed when i have my hand on my pistol, so when i press RMB, it's gonna go into fight mode.)

     

    Does this happen to anyone else? Or just me? that way i know if i can fix it.

     

  9. Basically speaks for itself.

    It would be great if it's like the Lenny's Mod Loader Support section:

    image.png.f8553b1790dbdf53df6d6663802c0060.png

     

    I used Inspect Element to give you a better understanding, that way it's easier to explain:

    image.png.24a5a91062d456db4f61d05618414aec.png

    This way the people that want to help or need help can do it easier.

    This would  be a useful feature for people who don't understand the API. Myself included.

  10. // Assault Suspects, MVA Vehicles, Suicidal Subjects || Drawing.Color.Red || ~r~
    // Police Officers || Drawing.Color.LightBlue || ~b~
    // Paramedics and Support || Drawing.Color.Lime || ~g~
    // Civilians || Drawing.Color.Orange || ~o~
    // Unknown Subjects || Drawing.Color.Yellow || ~y~
    // Other Items, Animals, Fallen Trees, Rocks || Drawing.Color.Purple || ~p~

    Post at bottom of your Main.cs I also put my links there. (ped, vehicle names, etc.)

    saved me 10 minutes over 2 weeks.

  11. I want it so a ped shoots everyone.

     

    Maybe take advantage of this?:

    Suspect.Tasks.FightAgainstClosestHatedTarget(50);            

    What i mean by that is, maybe there is a "hate everyone" feature, and then it just kills anyone since it then hates them.

     

    So far the only way i know is to just create peds, and have Suspect shoot at them. (  Suspect.Tasks.FightAgainst(pedname);   )

  12. 7 hours ago, Rich said:

    Seeing your actual code is more helpful than you telling us what it looks like.  The Process function is where you put the "meat" of your callout - it's where everything happens after the callout is accepted.

    I fixed it, couldn't reply because i went straight to bed after i fixed it, thanks alot for the help everyone.

    (I put Ped Suspect line in OnBeforeCallouts() because i was trying to figure out if that was it, but i forgot to move it again.)

  13. 1 hour ago, Adam DeLuca said:

    It looks like you're trying to create your suspect ped at spawn point but spawn point is defined as suspects position after you've attempted to spawn the ped.

     

    You need to get the coordinates for SpawnPoint before using it.

     

    
    // Define what your Spawn Point coordinates are. This will grab a random position on the street around your player.
    Vector3 SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(190, 500));
    
    // Now you can spawn your ped at the specified coordinates held in SpawnPoint
    Ped Suspect = new Ped("a_m_o_tramp_01", SpawnPoint, 10f);
    
    // You can then reuse SpawnPoint to get the ped coordinates or assign it to a new Vector3
    Vector3 SpawnPoint2 = Suspect.Position;

     

    Just be sure to define the SpawnPoint BEFORE trying to create your ped or you'll have issues. If you have a specific location you want to spawn your ped at then just define SpawnPoint as the x, y, z and use it the same way.

    It still doesn't work, but i thought it's useful if i provide some extra information: (just does the same as first)

    Spoiler

    1. at " private Ped Suspect; " it says CS0649: Field 'Gun.Suspect' is never assigned to, and will always have its default value null. (in error log it's a message, not an error or caution.)

     

    2. The callout does work(before and after advice) but it just spawns it at 1 location, and I don't have a specific X Y Z position set.

     

    3. I put the Vector3 SpawnPoint(the line you gave me) in OnBeforeCalloutDisplayed() , under that, i put the Ped Suspect line.

     

    4. public override void Process() is empty, since i don't know what to put there yet.

     

     

  14. When i accept the callout, it just ignores me and acts like i never got a callout.

     

    I tried:

    Spawnpoint = Suspect.Position;

    Also tried:

    Suspect.Position = SpawnPoint;

    I also tried without it but still the same.

     

    What it looks like:

    public override bool OnCalloutAccepted()
            {
                Ped Suspect = new Ped("a_m_o_tramp_01", SpawnPoint, 10f);
    
                SpawnPoint = Suspect.Position;

     

    I need the suspect to be in the callout area but i can't find anything else in object browser.

    RagePluginHook.log

  15. On 8/27/2020 at 8:48 PM, SzbZsmbr said:

    Is there any way to add more tabs in the vanilla LSPDFR Traffic Stop and other menus? Like if i want to add a Questioning tab or something? I feel that if that's possible, we could implement some useful and lightweight actions, without installing other HEAVY mods like Stop The Ped and Ultimate Backup. 

    I'm familiar with the XML's but it's not implemented.

    However i'm sure this would be possible, there is just no support for it.

  16. I need my callout to be at a random location, just like any other callout. How do i do that?

    (It currently spawns in front of me)

     

    What i currently use:

    SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(250f));

     

     

    Do i have to use alot of different coordinates or is there a feature for minimum callout range in the reference.

    My last resort is going around the map collecting coordinates.

     

    I manage to do everything succesfull besides this haha

     

  17. 10 hours ago, UnknownBastion said:

    Hello,

     

    Unfortunately, meta files cannot be sent as they are copyrighted material by Rockstar Games.

    In order to recover broken/deleted files, follow this:

     

      Hide contents

    Steam:

    1. Load Steam

    2. From the Library section, right-click on the game and select Properties from the menu.

    3. Select the Local files tab and click the Verify integrity of game cache... button.

    4. Steam will verify the game's files - this process may take several minutes.


    Rockstar:

    1. Go into your install directory and create a shortcut for GTAVLauncher.exe

    2. Right-click on the new shortcut and go to Properties

    3. On the Shortcut tab, add -verify to the end of the Target text box.
           For example, if your shortcut has
          "C:\Program Files\Rockstar Games\Grand Theft Auto V\GTALauncher.exe"
            to start, then it should look like this with the new flag
            "C:\Program Files\Rockstar Games\Grand Theft Auto V\GTALauncher.exe" -verify

    4. Hit OK

    5. Run this shortcut (may have to run as administrator)



    Hope This Helps! 🙂

    yes it did, thanks.

×
×
  • Create New...