skotracker

ExileClient_gui_wasteDumpDialog_show

Apr 19th, 2018
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 3.48 KB | None | 0 0
  1. private["_nearVehicles","_localVehicles","_display","_revenue","_sellButton","_dropdown","_vehicleObject","_vehicleName","_index","_crateTypes"];
  2. disableSerialization;
  3. _crateTypes = [
  4.         "CargoNet_01_box_F",
  5.         "Exile_Container_SupplyBox",
  6.         "I_CargoNet_01_ammo_F",
  7.         "O_CargoNet_01_ammo_F",
  8.         "B_CargoNet_01_ammo_F",
  9.         "I_supplyCrate_F",
  10.         "O_supplyCrate_F",
  11.         "B_supplyCrate_F",
  12.         "C_supplyCrate_F",
  13.         "IG_supplyCrate_F",
  14.         "Box_NATO_AmmoVeh_F",
  15.         "Box_East_AmmoVeh_F",
  16.         "Box_IND_AmmoVeh_F",
  17.         "I_CargoNET_01_F",
  18.         "O_CargoNET_01_F",
  19.         "B_CargoNET_01_F",
  20.         "Land_CargoBox_V1_F",
  21.         "ASC_B_box",
  22.         "Box_NATO_Wps_F",
  23.         "Box_East_Wps_F",
  24.         "Box_IND_Wps_F",
  25.         "Box_East_WpsLaunch_F",
  26.         "Box_NATO_WpsLaunch_F",
  27.         "Box_IND_WpsLaunch_F",
  28.         "Box_IND_WpsSpecial_F",
  29.         "Box_East_WpsSpecial_F",
  30.         "Box_NATO_WpsSpecial_F",
  31.         "Box_NATO_Wps_F",
  32.         "Box_East_Wps_F",
  33.         "Box_IND_Wps_F",
  34.         "Box_East_WpsLaunch_F",
  35.         "Box_NATO_WpsLaunch_F",
  36.         "Box_IND_WpsLaunch_F",
  37.         "Box_IND_WpsSpecial_F",
  38.         "Box_East_WpsSpecial_F",
  39.         "Box_NATO_WpsSpecial_F",
  40.         "Box_NATO_AmmoOrd_F",
  41.         "Box_East_AmmoOrd_F",
  42.         "Box_IND_AmmoOrd_F",
  43.         "Box_NATO_Grenades_F",
  44.         "Box_East_Grenades_F",
  45.         "Box_IND_Grenades_F",
  46.         "Box_NATO_Ammo_F",
  47.         "Box_East_Ammo_F",
  48.         "Box_IND_Ammo_F",
  49.         "Box_IND_Support_F",
  50.         "Box_East_Support_F",
  51.         "Box_NATO_Support_F"
  52.     ];
  53. _nearVehicles = nearestObjects [player, ["LandVehicle", "Air", "Ship"] + _crateTypes, 150];
  54. _localVehicles = [];
  55. {
  56.     if (local _x) then
  57.     {
  58.         if (alive _x) then
  59.         {
  60.             if (isNull attachedTo _x) then
  61.             {
  62.                 _localVehicles pushBack _x;
  63.             };
  64.         };
  65.     } else {
  66.         if (typeOf _x in _crateTypes) then
  67.         {
  68.             if (alive _x) then
  69.             {
  70.                 if (isNull attachedTo _x) then
  71.                 {
  72.                     _localVehicles pushBack _x;
  73.                 };
  74.             };
  75.         };
  76.     };
  77. }
  78. forEach _nearVehicles;
  79. if (_localVehicles isEqualTo []) exitWith
  80. {
  81.     ["ErrorTitleAndText", ["Whoops!", "Park within 50m and get in as driver first."]] call ExileClient_gui_toaster_addTemplateToast;
  82. };
  83. ExileClientCurrentTrader = _this;
  84. createDialog "RscExileWasteDumpDialog";
  85. waitUntil { !isNull findDisplay 24011 };
  86. _display = uiNameSpace getVariable ["RscExileWasteDumpDialog", displayNull];
  87. _revenue = _display displayCtrl 4001;
  88. _revenue ctrlSetStructuredText (parseText "<t size='1.4'>0<img image='\exile_assets\texture\ui\poptab_notification_ca.paa' size='1' shadow='true' /></t>");
  89. _sellButton = _display displayCtrl 4000;
  90. _sellButton ctrlEnable false;
  91. _dropdown = _display displayCtrl 4002;
  92. lbClear _dropdown;
  93. {
  94.     _vehicleObject = _x;
  95.     _vehicleName = getText(configFile >> "CfgVehicles" >> (typeOf _vehicleObject) >> "displayName");
  96.     _index = _dropdown lbAdd (format ["Cargo: %1", _vehicleName]);
  97.     _dropdown lbSetData [_index, netId _vehicleObject];
  98.     _dropdown lbSetValue [_index, 1];
  99.     _index = _dropdown lbAdd (format ["Vehicle + Cargo: %1", _vehicleName]);
  100.     _dropdown lbSetData [_index, netId _vehicleObject];
  101.     _dropdown lbSetValue [_index, 2];
  102. }
  103. forEach _localVehicles;
  104. true call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur;
  105. true
Add Comment
Please, Sign In to add comment