Advertisement
Guest User

Untitled

a guest
Jun 19th, 2020
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_clothingFilter.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Functionality for filtering clothing types in the menu.
  8. */
  9.  
  10. disableSerialization;
  11.  
  12. params [
  13. "", //Control
  14. ["_selection", 0, [0]]
  15. ];
  16.  
  17. life_clothing_filter = _selection;
  18.  
  19. switch (_selection) do {
  20. case 4: {
  21. life_shop_cam camSetTarget (player modelToWorld [0,-.15,1.3]);
  22. life_shop_cam camSetPos (player modelToWorld [1,-4,2]);
  23. life_shop_cam camCommit 1;
  24. };
  25.  
  26. case 0: {
  27. life_shop_cam camSetTarget (player modelToWorld [0,0,1]);
  28. life_shop_cam camSetPos (player modelToWorld [1,4,2]);
  29. life_shop_cam camCommit 1;
  30. };
  31.  
  32. case 3: {
  33. life_shop_cam camSetTarget (player modelToWorld [0,0,1.4]);
  34. life_shop_cam camSetPos (player modelToWorld [-.1,2,1.4]);
  35. life_shop_cam camCommit 1;
  36. };
  37.  
  38. default {
  39. life_shop_cam camSetTarget (player modelToWorld [0,0,1.6]);
  40. life_shop_cam camSetPos (player modelToWorld [-.5,1,1.6]);
  41. life_shop_cam camCommit 1;
  42. };
  43. };
  44.  
  45. if (isNull (findDisplay 3100)) exitWith {};
  46.  
  47. private _list = CONTROL(3100,3101);
  48. lbClear _list;
  49.  
  50. private _configArray = switch (_selection) do {
  51. case 0: {M_CONFIG(getArray,"Clothing",life_clothing_store,"uniforms");};
  52. case 1: {M_CONFIG(getArray,"Clothing",life_clothing_store,"headgear");};
  53. case 2: {M_CONFIG(getArray,"Clothing",life_clothing_store,"goggles");};
  54. case 3: {M_CONFIG(getArray,"Clothing",life_clothing_store,"vests");};
  55. case 4: {M_CONFIG(getArray,"Clothing",life_clothing_store,"backpacks");};
  56. };
  57.  
  58. private "_pic";
  59. private "_details";
  60.  
  61. {
  62. _x params [
  63. ["_className", "NONE", [""]],
  64. ["_displayName", "", [""]],
  65. ["_price", 1000, [0]]
  66. ];
  67.  
  68. if !(_className isEqualTo "NONE") then {
  69. _details = [_className] call life_fnc_fetchCfgDetails;
  70. _pic = (_details select 2);
  71. };
  72.  
  73. if ([_x] call life_fnc_levelCheck) then {
  74.  
  75. if (isNil "_details") then {
  76. _list lbAdd _displayName;
  77. _list lbSetData [(lbSize _list)-1,_className];
  78. } else {
  79. if (_displayName isEqualTo "") then {
  80. _list lbAdd (_details select 1);
  81. } else {
  82. _list lbAdd _displayName;
  83. };
  84.  
  85. _list lbSetData [(lbSize _list)-1,_className];
  86. _list lbSetValue [(lbSize _list)-1,_price];
  87. _list lbSetPicture [(lbSize _list)-1,_pic];
  88. };
  89. };
  90.  
  91. true
  92.  
  93. } count _configArray;
  94.  
  95. [] spawn {
  96. sleep 0.1;
  97. [] call life_fnc_playerSkins;
  98. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement