SHOW:
|
|
- or go back to the newest paste.
| 1 | params [ | |
| 2 | ['_grpType',configNull,[configFile]], | |
| 3 | ['_grpCost',0,[0]], | |
| 4 | ['_grpSide',resistance,[civilian]] | |
| 5 | ]; | |
| 6 | ||
| 7 | if (_grpSide == civilian) exitWith {hint "You cannot recruit civilians! That's a war crime, you absolute cunt";};
| |
| 8 | ||
| 9 | private _p_balance = [WEST_balance , EAST_balance, GUER_balance] select ([west, east, resistance] find _grpSide); | |
| 10 | private _g_spawn = ["BLU_FLAG" , "RED_FLAG", "GRN_FLAG"] select ([west, east, resistance] find _grpSide); | |
| 11 | ||
| 12 | if (_p_balance >= _grpCost) then {
| |
| 13 | _spawnGrp = [(getMarkerPos _g_spawn), _grpSide, _grpType] Call BIS_fnc_spawnGroup; | |
| 14 | [_grpCost,_grpSide,false] call BTH_fnc_HandleBalance; | |
| 15 | {
| |
| 16 | [_x] call BTH_fnc_UnitSetup; | |
| 17 | } forEach units _spawnGrp; | |
| 18 | } else {
| |
| 19 | hint "You cannot afford that group!" | |
| 20 | }; |