Advertisement
Guest User

Untitled

a guest
Oct 13th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. /**
  2. * ExileClient_gui_hud_renderPartyESP
  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["_red","_green","_blue","_alpha","_markeralpha","_pixelScale","_iconTextSize","_nameTextSize","_distance","_textAlpha","_iconAlpha","_position","_iconLabel","_markerPosition","_markerScreenPosition","_distanceToCenterOfScreen","_adjustedMarkerAlpha","_markerAlpha"];
  13. if (alive player) then
  14. {
  15. if (ExileClientAllowPartyMarkers) then
  16. {
  17. if ("ItemGPS" in (assignedItems _x) AND "ItemGPS" in (assignedItems player)) then
  18. {
  19. if !(ExileClientPartyID isEqualTo -1) then
  20. {
  21. _red = profileNamespace getVariable ["ExilePartyESPRed", 0.7];
  22. _green = profileNamespace getVariable ["ExilePartyESPGreen", 0.93];
  23. _blue = profileNamespace getVariable ["ExilePartyESPBlue", 0];
  24. _alpha = profileNamespace getVariable ["ExilePartyESPAlpha", 0.75];
  25. _markeralpha = profileNamespace getVariable ["ExilePartyMarkerAlpha", 0.75];
  26. _pixelScale = safeZoneH / (getResolution select 1);
  27. _iconTextSize = 18 * pixelH;
  28. _nameTextSize = 24 * pixelH;
  29. {
  30. if (isPlayer _x) then
  31. {
  32. if !(_x isEqualTo player) then
  33. {
  34. _distance = cameraOn distance _x;
  35. _textAlpha = linearConversion [20, 23, _distance, _alpha, 0, true];
  36. _iconAlpha = _alpha - _textAlpha;
  37. _position = _x modelToWorldVisual (_x selectionPosition "head");
  38. if (_textAlpha > 0) then
  39. {
  40. if !(ExilePlayerInSafezone) then
  41. {
  42. drawIcon3D
  43. [
  44. "",
  45. [_red, _green, _blue, _textAlpha],
  46. [_position select 0, _position select 1, (_position select 2) + 0.75],
  47. 0,
  48. 0,
  49. 0,
  50. name _x,
  51. false,
  52. _nameTextSize,
  53. "PuristaMedium",
  54. "center"
  55. ];
  56. };
  57. };
  58. if (_iconAlpha > 0) then
  59. {
  60. switch (ExilePartyEspMode) do
  61. {
  62. case 1:
  63. {
  64. _iconLabel = format ["%1 - %2m", name _x, floor _distance];
  65. };
  66. case 0:
  67. {
  68. _iconLabel = format ["%1m", floor _distance];
  69. };
  70. case 2:
  71. {
  72. _iconLabel = "";
  73. };
  74. };
  75. drawIcon3D
  76. [
  77. "\a3\ui_f\data\map\GroupIcons\selector_selectable_ca.paa",
  78. [_red, _green, _blue, _iconAlpha],
  79. _position,
  80. 1,
  81. 1,
  82. 0,
  83. _iconLabel,
  84. false,
  85. _iconTextSize,
  86. "PuristaMedium",
  87. "center"
  88. ];
  89. };
  90. };
  91. _markerPosition = _x getVariable ["ExilePartyMarker", -1];
  92. if !(_markerPosition isEqualTo -1) then
  93. {
  94. _markerScreenPosition = worldToScreen _markerPosition;
  95. if !(_markerScreenPosition isEqualTo []) then
  96. {
  97. _distanceToCenterOfScreen = _markerScreenPosition distance2D [0.5, 0.5];
  98. _adjustedMarkerAlpha = linearConversion [0.1, 0.4, _distanceToCenterOfScreen, 0.15, _markerAlpha, true];
  99. drawIcon3D
  100. [
  101. "\exile_assets\texture\hud\hud_icon_marker_ca.paa",
  102. [1, 1, 1, _adjustedMarkerAlpha],
  103. _markerPosition,
  104. 1,
  105. 1,
  106. 0,
  107. name _x,
  108. false,
  109. _iconTextSize,
  110. "PuristaMedium",
  111. "center"
  112. ];
  113. };
  114. };
  115. };
  116. }
  117. forEach units (group player);
  118. };
  119. };
  120. };
  121. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement