Jump to content
×
×
  • Create New...

Force Vehicle Extras in vehicles.json 1.0.0

   (0 reviews)

6 Screenshots

This plugin was EXTREMELY DIFFICULT to make, and I couldn't do it alone. A HUGE thanks for the assistance to @Grandpa Rexand @Natixco

 

My Discord: https://discord.gg/GmNua4ZY9K
Open Source: https://github.com/gggdunlix/FivePD-Set-Extras-in-Vehicles.json

HOW TO USE:

1. The DLL file must be put in your plugins folder

2. Your FivePD resource folder name must be exactly "fivepd" (without quotes)

3. Configure you vehicles.json

  • It should look something like this:
  • {
                "vehicle": "BCSO1",
                "name": "Charger (18)",
                "isAvailableForEveryone": false,
                "useRanks": false,
                "availableForDepartments": ["2"],
                "extras": [3, 5, 7, 8, 10]
            },

     

  • This makes it so the vehicle "bcso1" appears in duty menu with name "Charger (18)", isn't available for anyone, doesn't use ranks, is available for only department 2, and it uses extras 3, 5, 7, 8, and 10.
  •  
  • You also have the ability to set it as
  •  "extras": "all"

     

  • and
  •  "extras": "none"

     

  • to force all/no extras enabled.
    Make sure that there are no JSON errors. for example, I made sure there is a comma after 
    "availableForDepartments": ["2"],

     

 

Examples:

{
            "vehicle": "BCSO1",
            "name": "Charger (18)",
            "isAvailableForEveryone": false,
            "useRanks": false,
            "availableForDepartments": ["2"],
            "extras": [3, 5, 7, 8, 10]
        },

The BCSO1 has extras 3, 5, 7, 8, and 10 activated in **vehicles.json**. (These are lights, cameras, and roof items, etc) so they are activated by default in-game  when spawned with duty menu.

 

{
            "name": "Fire Truck",
            "vehicle": "firetruk",
            "isAvailableForEveryone": false,
            "useRanks": false,
            "availableForDepartments": ["6"],
            "extras": "none"
        },


The fire truck is set to have no extras, so the ram and it's other extras are default disabled when spawned with duty menu

 

{
            "name": "UM Cruiser",
            "vehicle": "police4",
            "isAvailableForEveryone": false,
            "useRanks": false,
            "availableForDepartments": ["2", "5", "4"],
            "extras": "all"
        },

The Unmarked Cruiser is set to have all extras enabled, so the Push bar and spotlights are enabled by default.

Edited by GGGDunlix
Add Discord & Source

A HUGE Thanks to @Grandpa Rexand @Natixco. They have helped me with several projects by this one was by far the most difficult.

Plugin code written by @Grandpa Rex, @Natixco, and @GGGDunlix.
Plugin idea given by @Grandpa Rex.

2018 Charger used in screenshots made by @PolarHusky99.

Instructions on how to use are in the regular desciption.
You can use this in your own server without crediting me, but you can't steal this file and upload it as your own.

You can use this in your own server without crediting me, but you can't steal this file and upload it as your own.

  • Like 1
 Share


User Feedback

Recommended Comments

If something is wrong with the plugin or you would like me to add something, please feel free to PM, comment, or message me/my server on discord.

  • Like 1
Link to comment
Share on other sites

1 minute ago, Grandpa Rex said:

Another great release, was fun tearing my hair out for the last 2 days 🤣

haha same

Link to comment
Share on other sites

20 minutes ago, Grandpa Rex said:

Another great release, was fun tearing my hair out for the last 2 days 🤣

 

18 minutes ago, GGGDunlix said:

haha same

It was worth it, you guys made an another amazing plugin! :snailparty:

Link to comment
Share on other sites

2 minutes ago, Alex W. said:

 

It was worth it, you guys made an another amazing plugin! :snailparty:

Thanks for the support!🥳

Link to comment
Share on other sites

Great idea. Will work well in combination with your license plate plugin. I had missed this post when I had commented over there. The only other thing that could be a negative for this is that while it is great for having car extras be uniform for all players who drive that vehicle, it doesn't work as well if different players want different lighting setups for the same vehicle. That is fine though as long as this doesn't do a constant override of the extras and is only applied when spawning a car via the Duty Menu. (I think that's how you set this up, I haven't done proper testing of your plugin) If players want to make further changes to their Extras after what is already set via your plugin's config, they can use something like vMenu for that. But this is perfect for departments who have a policy to which Extras are allowed.

  • Like 1
Link to comment
Share on other sites

50 minutes ago, Peelster1 said:

Great idea. Will work well in combination with your license plate plugin. I had missed this post when I had commented over there. The only other thing that could be a negative for this is that while it is great for having car extras be uniform for all players who drive that vehicle, it doesn't work as well if different players want different lighting setups for the same vehicle. That is fine though as long as this doesn't do a constant override of the extras and is only applied when spawning a car via the Duty Menu. (I think that's how you set this up, I haven't done proper testing of your plugin) If players want to make further changes to their Extras after what is already set via your plugin's config, they can use something like vMenu for that. But this is perfect for departments who have a policy to which Extras are allowed.

You are exactly correct, this only applies extras to vehicles spawned with duty menu.  You can use vMenu to change settings and add it as a saved vehicle if you would like.

  • Like 1
Link to comment
Share on other sites

13 minutes ago, phase gaming said:

Does this work for lspdfr?

 

No, this is only for FivePD

Link to comment
Share on other sites

this isnt working for me.  its in my plugins folder and the lines have been added to the vehicle file.  vehicles.json has been checked with a json linter and is good to go.  any advice?

Link to comment
Share on other sites

On 6/19/2022 at 9:34 PM, vladimirXXputin said:

this isnt working for me.  its in my plugins folder and the lines have been added to the vehicle file.  vehicles.json has been checked with a json linter and is good to go.  any advice?

Any console errors after trying to spawn a vehicle with configured extras?

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
Add a comment...

×   Pasted as rich text.   Restore formatting

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.

Important Information

Thanks for visiting GPM. As a user of the GTAPoliceMods platform, we ask that you review the Terms of Use, Privacy Policy, and Guidelines. These principles allow us to continue fostering a great community. We have placed cookies on your device to help improve your experience. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.