Authorised Crew Type Check

From F2 EN
Revision as of 23:46, 15 December 2012 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


The Authorised Crew Type Check component works in exactly the same way as the Authorised Crew Check component, but instead of checking for named player slots, it checks to see if the player is of a certain type or sub-type (such as pilot or a soldier of a west faction).


Required files

All the code associated with this component is found in:

  • init.sqf
  • stringtable.xml
  • f\common\f_isAuthorisedCrewType.sqf

How to activate

See section below.

How to use

Setting authorised crew type for a vehicle

In the ArmA2 editor, select the vehicle and ensure it has a name in the Name: field (such as MyTank).

Still in the editor, make sure the playable slots that you want to have as the authorised crew-members are of types such as Pilot or Crew.

Open the file init.sqf and look for the code segment entitled:

// F2 - Authorised Crew Type Check

Edit the following line, removing the // at the start, replacing VehicleName with the name of the vehicle, and the array ["UnitType1","UnitType2"] with an array containing the classnames or parent classes of the unit types authorised to act as crew.

// VehicleName addEventhandler ["GetIn", {[_this,["UnitType1","UnitType2"]] execVM "f\common\f_isAuthorisedCrewType.sqf"}];

For example, to ensure that only units of the type USMC_Soldier_Crew can act as the crew of MyTank, change the line to:

MyTank addEventhandler ["GetIn", {[_this,["USMC_Soldier_Crew"]] execVM "f\common\f_isAuthorisedCrewType.sqf"}];

Note: Remember to put "" around the unit types. If you want all BLUFOR soldiers but also Russian crewman to be able to drive MyTank, change the line to:

MyTank addEventhandler ["GetIn", {[_this,["SoldierWB","RU_Soldier_Crew"]] execVM "f\common\f_isAuthorisedCrewType.sqf"}];

Common unit types

Common unit types that you may want to use are:

Armoured CrewUSMC_Soldier_Crew
Armoured CrewCDF_Soldier_Crew
Armoured CrewRU_Soldier_Crew
Armoured CrewINS_Soldier_Crew
Armoured CrewGUE_Soldier_Crew
Civilian (Chernarus)PilotPilot
Civilian (Russia)PilotRU_Pilot


  • There is a known limitation with this feature: if a unit enters a vehicle as a passenger, s/he can sometimes use the action menu to move to a pilot / driver / commander / gunner position.
  • You can find a comprehensive list of all unit classes here


  • white angel
  • Ricardo
  • eJay
  • Raedor
  • Pillage
  • Rom
  • Fer
  • Black Mamba