19 lines
668 B
Plaintext
19 lines
668 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
params ["_item", "_price", "_itemType"];
|
|
|
|
private _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName");
|
|
// private _garage = player getVariable ["FORGE_Garage", []];
|
|
private _garage = GETVAR(player,FORGE_Garage,[]);
|
|
private _itemData = [[], 1, 0];
|
|
|
|
if !([_price] call FUNC(handlePurchase)) exitWith {};
|
|
|
|
_garage pushBack [true, _item, _itemData];
|
|
|
|
// player setVariable ["FORGE_Garage", _garage, true];
|
|
SETPVAR(player,FORGE_Garage,_garage);
|
|
|
|
[_item, _itemType] call EFUNC(armory,addVehArmory);
|
|
|
|
[format ["You have purchased %1 for $%2.", _displayName, _price], "info", 3, "right"] call EFUNC(misc,notify); |