BIS fnc crewCount: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Added params, syntax, examples.)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Function that counts amount of seats, both for crew and cargo seats. |= Description
 
Description:
Return number of crew positions in vehicle
 
Parameter(s):
0: STRING - vehicle class
1 (Optional): BOOL - true to include also cargo positions
 
Returns:
NUMBER
*/
 
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_crewCount]]; --> |= Syntax
| param call [[BIS_fnc_crewCount]]; |= Syntax


|p1= |= Parameter 1
|p1= [[String]] - Classname of vehicle. |= Parameter 1
|p2= [[Boolean]] - True if cargo seats should be included (see notes) |=


| |= Return value
| [[Number]] - Amount of seats in vehicle. |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>crewCount = ["B_Heli_Light_01_F",false] call BIS_fnc_crewCount; // Counts all available seats excluding cargo slots. Returns 6 (see notes).</code> |=
|x2 = <code>crewCount = ["B_Heli_Transport_01_F",true] call BIS_fnc_crewCount; // Counts all available seats including cargo slots. Returns 12.</code> |=
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 21:04, 1 October 2014


Hover & click on the images for description

Description

Description:
Function that counts amount of seats, both for crew and cargo seats.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
param call BIS_fnc_crewCount;
Parameters:
String - Classname of vehicle.
Boolean - True if cargo seats should be included (see notes)
Return Value:
Number - Amount of seats in vehicle.

Examples

Example 1:
crewCount = ["B_Heli_Light_01_F",false] call BIS_fnc_crewCount; // Counts all available seats excluding cargo slots. Returns 6 (see notes).
Example 2:
crewCount = ["B_Heli_Transport_01_F",true] call BIS_fnc_crewCount; // Counts all available seats including cargo slots. Returns 12.

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section