client/addons/garage/functions/fnc_fetchGarage.sqf
Jacob Schmidt c6daf95415
All checks were successful
Build / Build (push) Successful in 53s
Initial Repo Setup
2025-01-01 14:35:12 -06:00

20 lines
781 B
Plaintext

#include "..\script_component.hpp"
private _display = findDisplay IDD_GARAGEDIALOG;
private _garageList = _display displayCtrl IDC_GARAGEVEHICLELIST;
// private _storedVehicles = player getVariable ["FORGE_Garage", []];
private _storedVehicles = GETVAR(player,FORGE_Garage,[]);
lbClear _garageList;
{
_x params ["_isGarageVehicle", "_className", "_vehData"];
private _index = -1;
private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName");
private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture");
_index = _garageList lbAdd _displayName;
_garageList lbSetData [_index, str [_isGarageVehicle, _className, _vehData]];
_garageList lbSetPicture [_index, _picture];
} forEach _storedVehicles;