Advertisement
Guest User

fn_impoundMenu.sqf

a guest
Aug 8th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_impoundMenu.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Not actually a impound menu, may act as confusion to some but that is what I wanted.
  8. The purpose of this menu is it is now called a 'Garage' where vehicles are stored (persistent ones).
  9. */
  10. private ["_vehicles","_control"];
  11. disableSerialization;
  12. _vehicles = param [0,[],[[]]];
  13.  
  14. ctrlShow[2803,false];
  15. ctrlShow[2830,false];
  16. waitUntil {!isNull (findDisplay 2800)};
  17.  
  18. if (count _vehicles isEqualTo 0) exitWith {
  19. ctrlSetText[2811,localize "STR_Garage_NoVehicles"];
  20. };
  21.  
  22. _control = CONTROL(2800,2802);
  23. lbClear _control;
  24.  
  25. {
  26. _vehicleInfo = [(_x select 2)] call life_fnc_fetchVehInfo;
  27. _control lbAdd (_vehicleInfo select 3);
  28. _tmp = [(_x select 2),(_x select 8),(_x select 7)];
  29. _tmp = str(_tmp);
  30. _control lbSetData [(lbSize _control)-1,_tmp];
  31. _control lbSetPicture [(lbSize _control)-1,(_vehicleInfo select 2)];
  32. _control lbSetValue [(lbSize _control)-1,(_x select 0)];
  33. } forEach _vehicles;
  34.  
  35. ctrlShow[2810,false];
  36. ctrlShow[2811,false];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement