|Description:||Allows creating, attaching, and manipulating a CREW device with a vehicle, using script files and the Developer Console.|
This function adds actions to specific seats that allow the user to change the state of the CREW device.
By adding these numbers, multiple functions can be enabled, for instance:[vehicle player, 7] call fn_vbs_vehicleECM would install the device, turn it on and return its status (1+2+4=7).
|Syntax:||[vehicle, action, visible, action_seats, viewing_seats] call fn_vbs_vehicleECM|
|Return Value:||Array - Passed parameters and device state.|
When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.
|Examples:||Install a CREW device on the players vehicle, turn it off, and do not show the jam radius. Give the actions to seats 11, 12 and let seat 13 see the state:|
_crewStats = [vehicle player,9,false,[11,12],] call fn_vbs_vehicleECM;
If nil is passed as the 3rd parameter, the function performs the crew creation, as if it is done using the CREW Editor Object.
[vehicle player,1,nil] call fn_vbs_vehicleECM; // Passing nil gives all the seats CREW actions, and does not show the HUD in any of the seats.