Advertisement
Guest User

Untitled

a guest
May 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. #include "..\..\..\..\script_macros.hpp"
  2. /*
  3. AUTHOR : ARMA FRANCE LIFE
  4.  
  5. TOUTE REPRODUCTION COMPLETE OU PARTIELLE DE NOS SCRIPTS EST INTERDITES !
  6. LES SCRIPTS SONT EXCLUSIFS ET RESTERONT EXCLUSIFS A NOTRE MISSION !
  7. */
  8. _ItemShop = [_this, 0, "AFL_Medic"] call BIS_fnc_param;
  9. if(!dialog) then
  10. {
  11. if (!(createDialog "RscDisplayItemsShop")) exitWith {};
  12. };
  13.  
  14. _displayCreate = findDisplay 9000;
  15. _AFL_Items_shop_CTRL_LIST = _displayCreate displayCtrl 9001;
  16. showChat false;
  17. AFL_SOUND = soundvolume;
  18. AFL_MOUSE = false;
  19. 0 fadeSound 0;
  20. AFL_Building = "Land_House_Small_02_F" createVehicleLocal [0, 0, 0];
  21. AFL_Building setDir 290.479;
  22.  
  23. private _randPos = [[[[worldSize / 2, worldSize / 2, 0], worldSize / 2]], ["water"]] call BIS_fnc_randomPos;
  24. AFL_Building setPosATL [_randPos param [0], _randPos param [1], 5000];
  25. AFL_Building setVectorUp [0, 0, 1];
  26.  
  27. AFL_Logic = "Land_Tyre_F" createVehicleLocal [0, 0, 0];
  28. AFL_Logic setPosATL (AFL_Building modelToWorld [-2.9, -3.2, -0.72]);
  29. AFL_Logic setVectorUp [0, 0, 1];
  30. AFL_Logic hideObject true;
  31.  
  32. AFL_Holder = "GroundWeaponHolder_Scripted" createVehicleLocal [0, 0, 0];
  33. AFL_Holder attachTo [AFL_Logic, [0, -0.63, 1.45]];
  34. AFL_Holder setVectorDirAndUp [[0, 0, 1], [0, -1, 0]];
  35.  
  36. if (sunOrMoon isEqualTo 0) then {
  37. AFL_Light = "#lightpoint" createVehicleLocal [0, 0, 0];
  38. AFL_Light setLightBrightness 0.2;
  39. AFL_Light setLightAmbient [1,1,1];
  40. AFL_Light setLightColor [1,1,1];
  41. AFL_Light setPosATL (AFL_Building modelToWorld [-2.9, -3.2, 2.0]);
  42. };
  43.  
  44. AFL_Camera = "CAMERA" camCreate [0, 0, 0];
  45. cameraEffectEnableHUD false;
  46. showCinemaBorder false;
  47. AFL_Camera setPosATL (AFL_Building modelToWorld [-1.5, -3.3, 0.95]);
  48. AFL_Camera camSetFOV 0.75;
  49. AFL_Camera camSetFocus [1.394, 1];
  50. AFL_Camera setVectorDirAndUp [[-0.351803,-0.915757,-0.19397], [-0.0695604,-0.181068,0.981007]];
  51. AFL_Camera camCommit 0;
  52. AFL_Camera cameraEffect ["Internal", "Back"];
  53.  
  54. lbClear _AFL_Items_shop_CTRL_LIST;
  55. Liste_items = getArray(missionConfigFile >> "Store" >> "General" >> _GunShop);
  56. _liste_Items = (Liste_items select 0)select 1;
  57. {
  58. _bool = [_x] call ArmaFranceLifeClient_fnc_IsNull_vericator;
  59. if (_bool) then
  60. {
  61. _itemInfo = [(_x select 0)] call ArmaFranceLifeClient_fnc_FetchDetails;
  62. _displayName = _itemInfo select 1;
  63. _AFL_Items_shop_CTRL_LIST lbAdd _displayName;
  64. _AFL_Items_shop_CTRL_LIST lbSetData[(lbSize _AFL_Items_shop_CTRL_LIST)-1,(_itemInfo select 0)];
  65. _AFL_Items_shop_CTRL_LIST lbSetPicture[(lbSize _AFL_Items_shop_CTRL_LIST)-1,(_itemInfo select 2)];
  66. _Items = _itemInfo select 0;
  67. };
  68. true
  69. } count _liste_Items;
  70.  
  71. AFL_ITEMS_STORE_GUNS = _AFL_Items_shop_CTRL_LIST lbSetCurSel 0;
  72.  
  73. (findDisplay 9000) displayAddEventHandler ["MouseButtonDown", {
  74. if (_this select 1 isEqualTo 0) then {AFL_MOUSE = true;};
  75. }];
  76.  
  77. (findDisplay 9000) displayAddEventHandler ["MouseButtonUp", {
  78. if (_this select 1 isEqualTo 0) then {AFL_MOUSE = false;};
  79. }];
  80.  
  81. (findDisplay 9000) displayAddEventHandler ["MouseMoving", {
  82. if(AFL_MOUSE && {!isNull AFL_Holder}) then
  83. {
  84. params ["", "_x", "_y"];
  85. private _dir = getDir AFL_Logic;
  86. AFL_Logic setDir (_dir + (_x * ((ArmaFranceLifeClient_CONFIG_GEN(getNumber,"rotationSpeed") max 1) min 10)));
  87. };
  88. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement