Jump to content
×
×
  • Create New...
  • 0

Cars available based on rank limit


tromac
Reason for Locking
No response in over 48 hours.

By Smanbg, on 10/31/20 10:16 AM.

Question

Love the ability to restrict cars to players based on their ranks. My question is, is this limited to only working with a set number of cars? I have set the vehicles.json file up as a test with about 22 cars and only 10 show regardless of the rank being able to access more. I've checked the file incase of any errant commas but all looks good.

Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
{
	"police": [
		{
			"name": "LSPD 2011 Crown Vic",
			"vehicle": "code3cvpi",
			"isAvailableForEveryone": true,
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2013 Caprice",
			"vehicle": "code3cap",
			"isAvailableForEveryone": true
		},
		{
			"name": "LSPD 2016 Impala",
			"vehicle": "code316impala",
			"isAvailableForEveryone": true,
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2010 Charger",
			"vehicle": "code310charg",
			"isAvailableForEveryone": true,
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2016 Taurus",
			"vehicle": "code3fpis",
			"isAvailableForEveryone": true,
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2014 Tahoe",
			"vehicle": "code314tahoe",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer II", "Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2014 Charger",
			"vehicle": "code314charg",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer II", "Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2016 FPIU Explorer",
			"vehicle": "code316fpiu",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer II", "Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2020 FPIU Explorer",
			"vehicle": "code320exp",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer II", "Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD BMW Motorcycle",
			"vehicle": "code3bmw",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer II", "Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD Harley Davidson Motorcycle",
			"vehicle": "code3bmw",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2015 F150",
			"vehicle": "code3f150",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2018 F250",
			"vehicle": "code3f250",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2016 Silverado",
			"vehicle": "code3silverado",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD Durango",
			"vehicle": "code3durango",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer III", "Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2019 Silverado",
			"vehicle": "code3durango",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2016 Dodge RAM",
			"vehicle": "code3ram",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2018 Mustang",
			"vehicle": "code3mustang",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2018 Camaro",
			"vehicle": "code3camero",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2018 Charger",
			"vehicle": "code318charg",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2018 Charger K-9",
			"vehicle": "code318chargk9",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		},
		{
			"name": "LSPD 2018 Tahoe K-9",
			"vehicle": "code318tahoek9",
			"isAvailableForEveryone": false,
			"useRanks": true,
			"availableForRanks": ["Officer IV", "Sergeant I", "Sergeant II", "Sergeant III"],
			"availableForDepartments": [11]
		}
	],
	"ambulance": ["ambulance"],
	"airAmbulance": ["polmav2"],
	"firedept": ["firetruk"],
	"coroner": ["coroner"],
	"towtruck": ["flatbed"],
	"mechanic": ["utillitruck3"],
	"prisontransport": ["policet"],
	"animalControl": ["bison"],
	"taxi": ["taxi"]
}

I must be blind and missing a basic error in the code. Thanks for checking and having a look at this.

Link to post
Share on other sites
  • 0
10 hours ago, tromac said:

Think I just spotted it, a double up in the vehicle code3bmw. I'll fix and test.

2 Durango and 2 BMW 

https://prnt.sc/v9kyzj
https://prnt.sc/v9kzet

1181375915_ConwayGPMSign(2).png.222b6b96fc398f6107b76f0b800e9e59.png

 

Community Administrator and FivePD Support Guru

gpm_animated.gif

 

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

Important Information

Please view the site: Terms of Use, Privacy Policy, and Guidelines. // IMPORTANT: We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.