Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. /**
  2. * ExileClient_gui_vehicleRekeyDialog_event_onDropDownSelectionChanged
  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["_display", "_dropdown", "_index", "_vehicleObject", "_vehicleClassName", "_vehicleCost", "_rekeyCostControl", "_resetButton", "_purchaseButton"];
  13. disableSerialization;
  14. _display = uiNameSpace getVariable ["RscExileRekeyVehicleDialog", displayNull];
  15. _dropdown = _this select 0;
  16. _index = _this select 1;
  17. _vehicleObject = objectFromNetId (_dropdown lbData _index);
  18. if (isNull _vehicleObject) then
  19. {
  20. closeDialog 0;
  21. }
  22. else
  23. {
  24. _vehicleClassName = typeOf _vehicleObject;
  25. ExileRekeyVehicleObjectID = netID _vehicleObject;
  26. _vehicleCost = getNumber (missionConfigFile >> "CfgExileArsenal" >> _vehicleClassName >> "price");
  27. ExileRekeyCost = _vehicleCost * (getNumber (missionConfigFile >> "CfgTrading" >> "rekeyPriceFactor"));
  28. _rekeyCostControl = _display displayCtrl 4000;
  29. _rekeyCostControl ctrlSetStructuredText parseText format ["<t size='1.4'>%1<img image='\exile_assets\texture\ui\poptab_notification_ca.paa' size='1' shadow='true' /></t>", ExileRekeyCost];
  30. _resetButton = _display displayCtrl 4003;
  31. _resetButton ctrlEnable true;
  32. if ((player getVariable ["ExileMoney", 0]) >= ExileRekeyCost) then
  33. {
  34. _purchaseButton = _display displayCtrl 4001;
  35. _purchaseButton ctrlEnable true;
  36. };
  37. };
  38. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement