Advertisement
InnovativeStudios

fn_initStores.sqf

Jan 14th, 2023 (edited)
1,615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.25 KB | None | 0 0
  1. _mC = "SOG_Stores";
  2.  
  3. {
  4.     _storeCategories = (configFile >> _mC >> _x >> "storeCategories") call BIS_fnc_getCfgData;
  5.     _storeClass = (configFile >> _mC >> _x >> "className") call BIS_fnc_getCfgData;
  6.     _storeDir = (configFile >> _mC >> _x >> "dir") call BIS_fnc_getCfgData;
  7.     _storeItems = (configFile >> _mC >> _x >> "storeItems") call BIS_fnc_getCfgData;
  8.     _storeModsets = (configFile >> _mC >> _x >> "storeModsets") call BIS_fnc_getCfgData;
  9.     _storeName = (configFile >> _mC >> _x >> "storeName") call BIS_fnc_getCfgData;
  10.     _storePos = (configFile >> _mC >> _x >> "pos") call BIS_fnc_getCfgData;
  11.  
  12.     _store = _storeClass createVehicle [0, 0, 0];
  13.     _store setPosATL _storePos;
  14.     _store setDir _storeDir;
  15.     _store allowDamage false;
  16.  
  17.     diag_log format ["ClassName: %1 Pos: %2 Dir: %3 StoreName: %4", _storeClass, _storePos, _storeDir, _storeName];
  18.     diag_log format ["StoreCategories: %1 StoreModsets: %2", _storeCategories, _storeModsets];
  19.     diag_log format ["StoreItems: %1", _storeItems];
  20.    
  21.     _store setVariable ["isStore", [_storeName, _storeCategories, _storeItems, _storeModsets], true];
  22.     _store setVariable ["storeCategory", "General", true];
  23.     _store setVariable ["storeModset", "STOCK", true];
  24. } forEach ((configFile >> _mC >> "stores") call BIS_fnc_getCfgData);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement