Advertisement
Guest User

Untitled

a guest
May 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 2.13 KB | None | 0 0
  1. /*
  2. *
  3. *       Dev'Arma 3 France
  4. *       Mission Template
  5. *       [DA3F] Aroun Le BriCodeur
  6. *       configuration.sqf
  7. *
  8. */
  9.  
  10. if !((currentWeapon (vehicle player)) in ["Rangefinder","Laserdesignator"]) exitWith {};
  11.  
  12.         if !(cameraView isEqualTo "GUNNER") exitWith {
  13.             switch (currentWeapon (vehicle player)) do {
  14.                 case "Rangefinder": {
  15.                     hintSilent format ["Regarde dans ton télémètre",nil];
  16.                 };
  17.                 case "Laserdesignator": {
  18.                     hintSilent format ["Regarde dans ton désignateur",nil];
  19.                 };
  20.             };
  21.         };
  22.  
  23. switch (DA3F_IsArrowActived) do {
  24.     case true: {
  25.     hint "Détection désactivé";
  26.         onEachFrame {};
  27.         deleteVehicle arrow;
  28.         arrow = nil;
  29.     7 cutText ["","PLAIN"];
  30.     DA3F_IsArrowActived = false;
  31.     };
  32.     case false: {
  33.     hint "Détection activé";
  34.     DA3F_IsArrowActived = true;
  35.         arrow = "Sign_Arrow_F" createVehicle [0,0,0];
  36.         onEachFrame {
  37.             _ins = lineIntersectsSurfaces [
  38.                 AGLToASL positionCameraToWorld [0,0,0],
  39.                 AGLToASL positionCameraToWorld [0,0,1000],
  40.                 player
  41.             ];
  42.             if (count _ins == 0) exitWith {arrow setPosASL [0,0,0]};
  43.             arrow setPosASL (_ins select 0 select 0);
  44.             arrow setVectorUp (_ins select 0 select 1);
  45. //MCF_HUD_Kill
  46.     7 cutRsc ["MCF_HUD_Kill","PLAIN"];
  47.         private _ui     = uiNamespace getVariable "MCF_HUD_Kill";
  48.         private _Txt    = _ui displayCtrl 3123500;
  49.         private _obj    = typeOf(_ins select 0 select 2);
  50.         private _dist   = [round(player distance(_ins select 0 select 2))]call DA3F_fnc_numberText;
  51.  
  52.         if (_dist isEqualTo "10,000,000,000") then {
  53.             _dist = "Search"
  54.         };
  55.  
  56.         if (_obj isEqualTo "") then [{
  57.             _obj = "Search"
  58.         },{
  59.             _obj = getText(ConfigFile >> "CfgVehicles" >> _obj >> "DisplayName");
  60.         }];
  61.         //  hintSilent format ["%1 à %2m", typeOf(_ins select 0 select 2), round(player distance(_ins select 0 select 2))];
  62.  
  63.             _Txt ctrlSetStructuredText parseText format ["<t color='#018CD7' shadom='1' size='1' >%1 <br/> %2m<br/>%3<t/>",
  64.             _obj,
  65.             _dist
  66.             ];
  67.             _posTxt = ctrlPosition _Txt;
  68.             _Txt ctrlSetPosition [_posTxt select 0,(_posTxt select 1) + 0.25,_posTxt select 2,_posTxt select 3];
  69.             _Txt ctrlCommit 0;
  70.         };
  71.     };
  72. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement