ACE3/addons/fortify/functions/fnc_getCost.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

24 lines
496 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Kingsley
* Gets the cost for the given side and classname.
*
* Arguments:
* 0: Side <SIDE>
* 1: Classname <STRING>
*
* Return Value:
* Cost <NUMBER>
*
* Example:
* [west, "Sandbag"] call ace_fortify_fnc_getCost
*
* Public: Yes
*/
params ["_side", "_classname"];
private _objects = missionNamespace getVariable [format [QGVAR(Objects_%1), _side], []];
(((_objects select {(_x select 0) == _classname}) param [0, []]) param [1, 0])