Author: ProfCupcake
Author Website:

Requirements: No addons required

Version: 2014-02-03

Short description: A script that will restrict certain vehicles to certain drivers/gunners (or pilots/copilots, etc.).

Date: 2014-02-03 19:09

Comments: (3)


Dead Simple Vehicle Restrictor


A script that will restrict certain vehicles to certain drivers/gunners/commanders (or pilots/copilots, etc.). If a unit which is not allowed to be the driver, gunner or commander of a vehicle attempts to go into those spots, they are removed, and get a warning message. Two sentences is all my mind can cope with.

Installation / Usage:
Copy the "scripts" folder into your mission folder.
Then either copy the init.sqf here into the mission folder, or add the following line into any existing init.sqf:
[["restricted vehicles"],["allowed drivers"], "message upon ejection",true,true,true] execVM "scripts\restrictVehicles.sqf";
Replacing the "restricted vehicles" with a list of the vehicles you want restricting, the "allowed drivers" with a list of the units allowed to access them, and the "message upon ejection" with the message you want to appear to players when they are kicked out of the vehicle.

It supports both classnames and object names, as well as player UIDs.

It is possible to call the script multiple times to effectively create separate vehicle/operator groups, but note that high amounts may impact performance.

If you want to only restrict certain seats, switch one or two of the three 'true' variables to 'false'. These control whether the script checks the commander, gunner and driver seats, respectively.

- You can now choose which seats are checked
- You can now set the message shown when a player is ejected
- You can now call the script multiple times to effectively make multiple separate whitelists
- Slightly optimised

- It now also checks the commander spot, which I had overlooked.
- It now uses moveOut, which does instantly eject units without animation.
- It now also supports player UIDs for the 'allowed drivers' list.

- first release

Forum topic:
- BI forums

Enable javascript to be able to download from Armaholic please!

Tags: Driver,   Gunner,   Pilot,   Restrict