Jump to content

420Chuur

Members
  • Posts

    26
  • Joined

  • Last visited

 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 420Chuur

  1. On 9/3/2019 at 9:34 PM, AlexanderK. said:

    Hello.
     

    I know others have already implemented that, but how it is possible to start a Controlled Fire?  By Controlled, I mean specified Area and X Minutes duration. 

    The purpose is to start the controlled fire in a Callout.


    I have only found outdated info in this topic, so I would appreciate a little updated code!

    Thank you!

     

    @NoNameSet Has a Fire wrapper class that he made a long time ago.  https://gist.github.com/NoNameSet/caf779fd7385f1f77b135d52c807e807 

  2. 1 hour ago, SneakySteve said:

    Thanks, forgive me but I'm still fairly new to programming, would you mind explaining how I would call this? Does it work like a method? Inside a callout how would I write the code that would tell this class to display a marker? Do I call it like a method like "Marker.Marker();"? Thanks alot for your help 🙂

     


    First of all you would create a new class named say Marker.cs.
    Put the code in that spoiler in there and rename to your namespace (where it says YourProjectName).
    Then from that point in a callout you can use Marker1 = new Marker(); With your parameters.
    Marker1.Visible = true;

     

  3. On 8/18/2019 at 12:04 PM, SneakySteve said:

    Well I'm no longer receiving errors or crashes but in a way that's just more frustrating as the marker still won't appear... my new code reads as such: 

      Reveal hidden contents

    Rage.Native.NativeFunction.Natives.DRAW_MARKER(2, target.X, target.Y, target.Z, 0.0f, 0.0f, 0.0f, 180.0f, 0.0f, 0.0f, 0.75f, 0.75f, 0.75f, 204, 204, 0, 100, false, true, 2, false, false, false, false);

     

    I still can't find the paramaters I'm supposed to use anywhere online, but I found one thread where someone used the code above (different x, y, z obviously) but it just wont work for some reason.

    I use a extension class specifically for markers. I can't remember where I found it , Was on google somewhere. I did look again but couldn't find the author. I take no credit for this class & if anyone knows who created it please let me know so I can credit them.
     

    Spoiler
    Spoiler

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Rage;

    namespace YourProjectName
    {
        
        internal class Marker
        {
            public System.Drawing.Color Color { get; set; }

            private bool Bobupanddown;
            private MarkerTypes markertype;

            public bool Visible { get; set; }
            public Vector3 Position { get; set; }

            private bool loop = true;
            private GameFiber process;

            public enum MarkerTypes
            {
                MarkerTypeUpsideDownCone = 0,
                MarkerTypeVerticalCylinder = 1,
                MarkerTypeThickChevronUp = 2,
                MarkerTypeThinChevronUp = 3,
                MarkerTypeCheckeredFlagRect = 4,
                MarkerTypeCheckeredFlagCircle = 5,
                MarkerTypeVerticleCircle = 6,
                MarkerTypePlaneModel = 7,
                MarkerTypeLostMCDark = 8,
                MarkerTypeLostMCLight = 9,
                MarkerTypeNumber0 = 10,
                MarkerTypeNumber1 = 11,
                MarkerTypeNumber2 = 12,
                MarkerTypeNumber3 = 13,
                MarkerTypeNumber4 = 14,
                MarkerTypeNumber5 = 15,
                MarkerTypeNumber6 = 16,
                MarkerTypeNumber7 = 17,
                MarkerTypeNumber8 = 18,
                MarkerTypeNumber9 = 19,
                MarkerTypeChevronUpx1 = 20,
                MarkerTypeChevronUpx2 = 21,
                MarkerTypeChevronUpx3 = 22,
                MarkerTypeHorizontalCircleFat = 23,
                MarkerTypeReplayIcon = 24,
                MarkerTypeHorizontalCircleSkinny = 25,
                MarkerTypeHorizontalCircleSkinny_Arrow = 26,
                MarkerTypeHorizontalSplitArrowCircle = 27,
                MarkerTypeDebugSphere = 28
            };

            public Marker(Vector3 pos, System.Drawing.Color color, bool bobupanddown, MarkerTypes markert = MarkerTypes.MarkerTypeUpsideDownCone, bool visible = true)
            {
                Position = pos;
                Color = color;

                Bobupanddown = bobupanddown;
                markertype = markert;
                
                Visible = visible;
                
                
                process = new GameFiber(Process);
                process.Start();
            }

            public void Dispose()
            {
                loop = false;
                process.Abort();
            }

            private void Process()
            {
                while (loop)
                {
                    GameFiber.Yield(); //prior to continue!

                    if (!Visible) continue;

                    Rage.Native.NativeFunction.CallByName<uint>(
                        "DRAW_MARKER",
                        (int)markertype,

                        Position.X,
                        Position.Y,
                        Position.Z,

                        Position.X,
                        Position.Y,
                        Position.Z,

                        0.0f, 0.0f, 0.0f,

                        1.0f, 1.0f, 1.0f,

                        (int)Color.R,
                        (int)Color.G,
                        (int)Color.B,
                        100, //alpha
                        Bobupanddown, true,
                        "", "",
                        false);

                }
            }
        }
    }

     

     

  4. On 6/19/2019 at 4:17 AM, LMS said:

    It is not new. It ranges from 0-100. There is no specific default value, it is randomly generated based on ped properties ranging from 1 - 14. Upon further looking into it, it is only used to determine whether a vehicle is stolen, its other uses for arrest etc. have been replaced by a new system. I will add a way to influence the new system in the next update.

    Ok cheers! So correct me if i'm wrong, Setting SetPedResistanceChance to 0, would in theory stop my suspects from stealing a vehicle when in a pursuit? Whereas setting it to 100 would guarantee the suspect would steal a vehicle? Maybe could do something along the lines of renaming it to SetPedStealVehicleInPursuitChance & adding a SetPedArrestResistanceChance.
    Would love to have my suspects told to surrender, put their hands up as if they're surrendering then take off. Even a SetPedFleeChanceWhileCuffed could be interesting.(Having a ped you've already arrested try to flee while cuffed. Happens all too often IRL.)

  5. @LMS I load LSPDFR manually, Seem to be encountering this exception. Doesn't happen all the time but usually the first 2-3 times I try load the plugin.

     

    Spoiler

    [TRACE] Started new menu thread MenuBase #6
    LSPD First Response: 
    LSPD First Response: ==============================
    LSPD First Response: UNHANDLED EXCEPTION DURING GAME FIBER TICK
    LSPD First Response: ------------------------------
    LSPD First Response: Origin: Game fiber "MenuBase".
    LSPD First Response: ------------------------------
     LSPD First Response: Exception type: System.NullReferenceException
     LSPD First Response: Exception message: Object reference not set to an instance of an object.
    LSPD First Response: ------------------------------
    LSPD First Response: Inner exceptions:
    LSPD First Response: ------------------------------
    LSPD First Response: Stack trace:
    LSPD First Response: at ‭‫‭‪‌‍‭‌‪‎‎‮‭‍‏‌‮‪‫‬‫‮‮‮‍‬‮.‍‮‮‌‌‮‎‌‎‪‍‬‌‭‬‎‌‍‮‍‬‎‏‫‌‭‎‌‮() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Menus\InteractionVehicleMenu.cs:line 438
    at ‌‎‭‫‬‬‫‫‎‭‌‫‪‭‏‫‌‫‭‫‏‫‍‮.‍‍‮‫‪‫‍‪‏‫‌‏‬‍‮‍‎‍‪‮‮‎‪‍‮() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Menus\MenuBase.cs:line 65
    at Rage.GameFiber.Main()
    LSPD First Response: ==============================

     

  6. @LMS Any insight on why i'm getting this exception when in a pursuit? Has happened about 3 times now?  I understand the Rage.Vehicle is invalid but what vehicle? I see my suspect now enters/ steals cars when in a pursuit instead of just fleeing on foot. Could it be something to do with that?

    Spoiler

    ==============================
    [3/25/2019 11:03:46 AM.548] LSPD First Response: UNHANDLED EXCEPTION DURING GAME FIBER TICK
    [3/25/2019 11:03:46 AM.549] LSPD First Response: ------------------------------
    [3/25/2019 11:03:46 AM.550] LSPD First Response: Origin: Game fiber "<UNNAMED THREAD>".
    [3/25/2019 11:03:46 AM.551] LSPD First Response: ------------------------------
    [3/25/2019 11:03:46 AM.552] LSPD First Response: Exception type: Rage.Exceptions.InvalidHandleableException
    [3/25/2019 11:03:46 AM.552] LSPD First Response: Exception message: Operation is not valid because the specified  Rage.Vehicle is invalid.
    [3/25/2019 11:03:46 AM.553] LSPD First Response: ------------------------------
    [3/25/2019 11:03:46 AM.554] LSPD First Response: Inner exceptions:
    [3/25/2019 11:03:46 AM.556] LSPD First Response: ------------------------------
    [3/25/2019 11:03:46 AM.557] LSPD First Response: Stack trace:
    [3/25/2019 11:03:46 AM.558] LSPD First Response: at Rage.Entity.get_Model()
    [3/25/2019 11:03:46 AM.558] at ‌‏‮‫‍‬‌‌‏‮‍‎‬‏‍‮‎‍‮‍‭‎‍‍‮.‏‭‏‎‎‏‎‍‎‭‌‪‫‏‬‬‫‌‬‮‪‭‎‮[](String , Func`1 ) in E:\GTA V\LSPD First Response\LSPD First Response\Engine\Scripting\AI\Blackboard.cs:line 69
    [3/25/2019 11:03:46 AM.561] at ‮‬‌‮‫‮‮‬‍‪‎‮‬‌‎‫‏‬‭‌‌‮‬‫‮‭‍‎‪‮.‮‭‫‌‏‬‫‮‬‬‍‪‎‫‮‭‍‌‭‮‎‌‏‪‮(Entity ) in E:\GTA V\LSPD First Response\LSPD First Response\Engine\Scripting\CachedCalls.cs:line 29
    [3/25/2019 11:03:46 AM.564] at ‌‎‎‍‪‎‫‌‬‎‎‎‪‭‮‎‎‮.‮‌‪‍‮‪‪‭‌‭‍‭‌‎‫‪‮‏‫‍‏‌‎‮(Ped , Ped[] ) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\EvacuateStreetManager.cs:line 39
    [3/25/2019 11:03:46 AM.568] at ‏‪‭‮‎‮‎‍‬‬‮‍‪‭‏‪‬‍‎‮‭‭‌‏‫‮.‎‭‍‏‍‎‬‮‍‍‍‬‬‍‏‪‏‭‎‎‪‫‎‮() in E:\GTA V\LSPD First Response\LSPD First Response\Engine\Scripting\Chase.cs:line 229
    [3/25/2019 11:03:46 AM.568] at ‫‪‎‫‫‍‎‌‫‫‎‫‏‪‎‎‎‏‮‎‪‮.‎‭‍‏‍‎‬‮‍‍‍‬‬‍‏‪‏‭‎‎‪‫‎‮() in E:\GTA V\LSPD First Response\LSPD First Response\Engine\Main.cs:line 54
    [3/25/2019 11:03:46 AM.569] at ‮‏‭‎‮‬‌‬‫‬‮‌‏‎‮‭‬‏‭‫‮.‍‮‫‭‬‮‮‌‌‮‎‭‍‪‏‫‪‎‫‮() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\LSPDFR.cs:line 741
    [3/25/2019 11:03:46 AM.570] at Rage.GameFiber.Main()
    [3/25/2019 11:03:46 AM.572] LSPD First Response: ==============================

     

  7. A issue I have found is when concluding a pursuit , The number of suspects apprehended is never correct. E.G I Pursued a baller with 4 occupants, They stopped 2 of them got out , started shooting ,one was killed the other surrendered. The other 2 were ripped out of the vehicle and apprehended. Never the less, In the notification , Suspects Apprehended = 6. 😕 Suspects killed = 1.

  8. 5 hours ago, jitsuin666 said:

    you see those are exactly what i want to use, thank you kind sir... now about that police hat and glasses... is that like advanced hook stuff... lspdfr use only xD someone? help me i cant patrol streets without hat and glasses 😞

    oh and thank you for the ptfx code, going to be testing that very soon 😉

     

    you are an angel sent from heaven 😘

    i dont have much to offer you but i do know how to summon the jew fairy

     

     

    do you see how sad my police woman looks with no hat 😞

     

    Np, Although all the info I gave you can be found from google 😄 . You may want to take a look at this post here:  https://gtaforums.com/topic/808513-changing-ped-clothes-and-attaching-props-to-ped-via-scripts/, Down where it says props.

  9. 18 hours ago, jitsuin666 said:

    i just wanted to do it the safes way possible, im not sure if i can give a weapon when i already have one and it just screws with gta's memory... just trying to play it safe and point at the weapon itself that already exists and set the ammo on it...it would be nice if we had something like ped.Inventory.GetWeapon(weaponHash).Ammo 😉

     

    rph is calling the game natives and maybe the game natives are supposed to be used a certain way, unless you know for a fact otherwise... i use to code for iv with scripthook.net and you could mess up gta if you werent using natives right and get access violations left and right... rockstar doesnt program their native functions to check to make sure dev is using at correct time, they know how to use them, i dont, we all guess and look to decompiled scripts for example


    You could use one of the natives,  ADD_AMMO_TO_PED(Ped ped, Hash weaponHash, int ammo), 

    SET_PED_AMMO(Ped ped, Hash weaponHash, int ammo)
    
    
    
  10. On 1/26/2019 at 1:33 PM, jitsuin666 said:

    Hello fellow officers... i need some help if anyone has a moment, i am not new to coding gta so if you want to explain quickly, that is fine...

     

    1. how do you attach ptfx smoke to an object?

     

    2. how do you add ammo to a weapon in the ped inventory?

     

    3. How do you spawn a police hat and sunglasses like they do in lspdfr?? (it is not a character variation I guess)

     

    I am using the RagePluginHook but all I need to know is which native functions can do this or someone can give an example of the code?

     

    thanks

    Ok for a start 1: These are the natives for ptfx, this will make the purple clown appears smoke.
    NativeFunction.Natives.REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2");
    NativeFunction.Natives.x6C38AF3693A69A91("scr_rcbarry2"); // _SET_PTFX_ASSET_NEXT_CALL
    NativeFunction.Natives.START_PARTICLE_FX_NON_LOOPED_AT_COORD<uint>("scr_clown_appears", Game.LocalPlayer.Character.Position, 0, 0, 0, 5.5f, 0, 0, 0);

    2: Why not just give a new weapon and set the amount of ammo there?IGame.LocalPlayer.Character.Inventory.GiveNewWeapon(WeaponHash.Pistol, 9999, true);

     

    3: Why not use EUP Menu, That way you can choose,save & load your custom outfits with or without sunglasses , police hat ect...

    19 hours ago, jitsuin666 said:

    well i try to help people but i notice nobody helps me, this isnt my first thread asking how to spawn a police hat. The other day I showed someone how to make a menu, i wasted like 10-15 minutes explaining and even made example code for them and not even a thanks.

     

    Do you know how to spawn the pllice hat and glasses... i think they look so very very cool and geee wouldnt it be nice if i can spawn them too 😄 but nah nobody cares about me, no one wants to help me, why do you care if i curse... let me curse at the clouds if it makes me feel better, nobody was ever going to come here and read it, nobody cares, it made me feel better typing it 😛

     

    you see my avatar... that's an actual photo of me

     

    Do you expect people to go through every post on these forums hourly? 😄 
    Maybe joining the RPH Discord channel would be more appropriate.

    ALSO, People care if you curse because your just wasting space in a post. 

    Everyone has an opinion, People just need to learn there's a time and a place to voice it :). & Here is not it 😜 

×
×
  • Create New...