Author: Bake
Author Website:

Requirements: No addons required

Version: 0.8

Short description: Restricts vehicles based on player roles and UIDs

Date: 2013-02-28 02:26


Comments: (2)
Rating:



 

Vehicle Restrictions

by
Bake


Description:
This script restricts vehicles based on player roles and UIDs.

For example it can be used to restrict aircraft to pilots, door gunner seats to crew chiefs and certain vehicles to members.


Features:
  • Vehicle restrictions based on roles and UIDs
  • Detects players switching seats
  • Supports custom messages
  • Allows for members only vehicles by supporting UIDs
  • Can tell apart all seats, including different gunner positions
  • Works for all vehicles


Installation:
Extract the vehicleRestrictions folder into your mission's root folder or any subfolder you want. Then add the following code to your init.sqf file (create one if necessary):
BAKE_VREST_RESTRICTIONS = [
	["blackHawk", "a10"], [
		[['["Driver"]'], ["pilot_1", "pilot_2"], "Pilots only."],
	],
	["a10"], [
		[['["Driver"]'], ["123", "456"], "Members only."]
	]
];

execVM "vehicleRestrictions\init.sqf";


Configuration:
In the example above the pilot seats of the aircraft named blackHawk and a10 are restricted to the pilot_1 and pilot_2 roles. Furthermore the a10 is restricted to players with the UID 123 or 456.

Per vehicle restriction there are 2 arrays inside the BAKE_VREST_RESTRICTIONS array, one that defines the restricted vehicles and one that contains restriction arrays which consists of 3 values. The first value is an array of restricted vehicle roles, the second one a slot or UID whitelist and the last one a message to display.

To find out the vehicle roles add this line before execVM:
BAKE_VREST_SHOW_ROLE = true;
Then enter a vehicle and the current role will be copied to your clipboard.


Repository:
To suggest features, report issues, contribute or keep track of the development use the Git repository.




Enable javascript to be able to download from Armaholic please!



Tags: Members,   Restrictions,   Vehicle