Guest User

ExileClient_gui_wasteDumpDialog_show

a guest
Jul 24th, 2016
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.96 KB | None | 0 0
  1. /**
  2.  * ExileClient_gui_wasteDumpDialog_show
  3.  *
  4.  * Exile Mod
  5.  * www.exilemod.com
  6.  * © 2015 Exile Mod Team
  7.  *
  8.  * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  9.  * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  10.  */
  11.  
  12. private["_nearVehicles","_localVehicles","_display","_revenue","_sellButton","_dropdown","_vehicleObject","_vehicleName","_index"];
  13. disableSerialization;
  14. _nearVehicles = nearestObjects [player, ["LandVehicle", "Air", "Ship", "Exile_Container_SupplyBox"], 150];
  15. _localVehicles = [];
  16. {
  17.     if (local _x) then
  18.     {
  19.         if (alive _x) then
  20.         {
  21.             _localVehicles pushBack _x;
  22.         };
  23.     };
  24. }
  25. forEach _nearVehicles;
  26. if (_localVehicles isEqualTo []) exitWith
  27. {
  28.     ["ErrorTitleAndText", ["Whoops!", "Park within 50m and get in as driver first."]] call ExileClient_gui_toaster_addTemplateToast;
  29. };
  30. ExileClientCurrentTrader = _this;
  31. createDialog "RscExileWasteDumpDialog";
  32. waitUntil { !isNull findDisplay 24011 };
  33. _display = uiNameSpace getVariable ["RscExileWasteDumpDialog", displayNull];
  34. _revenue = _display displayCtrl 4001;
  35. _revenue ctrlSetStructuredText (parseText "<t size='1.4'>0<img image='\exile_assets\texture\ui\poptab_notification_ca.paa' size='1' shadow='true' /></t>");
  36. _sellButton = _display displayCtrl 4000;
  37. _sellButton ctrlEnable false;
  38. _dropdown = _display displayCtrl 4002;
  39. lbClear _dropdown;
  40. {
  41.     _vehicleObject = _x;
  42.     _vehicleName = getText(configFile >> "CfgVehicles" >> (typeOf _vehicleObject) >> "displayName");
  43.     _index = _dropdown lbAdd (format ["Cargo: %1", _vehicleName]);
  44.     _dropdown lbSetData [_index, netId _vehicleObject];
  45.     _dropdown lbSetValue [_index, 1];
  46.     _index = _dropdown lbAdd (format ["Vehicle + Cargo: %1", _vehicleName]);
  47.     _dropdown lbSetData [_index, netId _vehicleObject];
  48.     _dropdown lbSetValue [_index, 2];
  49. }
  50. forEach _localVehicles;
  51. true call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur;
  52. true
Add Comment
Please, Sign In to add comment