#include "..\script_component.hpp" /* * Author: IDSolutions * Adds vehicle to player's garage unlocks and updates virtual garage */ params [["_class","",[""]],["_type",0,[0]]]; private _default = [[],[],[],[],[],[]]; private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default); private _index = (_garage_unlocks select _type) pushBackUnique _class; if (_index > -1) then { SETVAR(player,Garage_Unlocks,_garage_unlocks); [[_class]] call FUNC(addVirtualVehs); ["garage",_garage_unlocks] call FUNC(updateUnlocks); ["garage"] call FUNC(saveUnlocks); TRACE_2("Vehicle added to garage",_class,_type); true } else { false };