Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. ///////////////////////////////////////////////////////////////////////////////////////////////////
  2. // TOP-DOWN ATTACK MODE ADDON FOR TITANLAUNCHER
  3. // MADE BY MOERDERHOSCHI
  4. // ARMED-ASSAULT.DE
  5. //Modified by Flipped
  6. ///////////////////////////////////////////////////////////////////////////////////////////////////
  7.  
  8. fnc_mdh_topDownAttack_targetType = {
  9.  
  10. _display = _this select 0;
  11. _idc = -1;
  12. _ctrl = _display displayCtrl _idc;
  13. _target = cursortarget;
  14.  
  15. _noTarget =
  16. {
  17. _ctrl = _this select 0;
  18. _ctrl ctrlSetText "TargetType: NoTarget";
  19. _ctrl ctrlCommit 0.1;
  20. };
  21.  
  22. if (isNull _target) exitWith { [_ctrl] call _noTarget};
  23. if (({_target isKindOf _x} count ["man","car","tank","ship","helicopter"] < 1)) exitWith { [_ctrl] call _noTarget};
  24. if (_target isKindOf "Animal") exitWith { [_ctrl] call _noTarget};
  25. if (_target isKindOf "helicopter") exitWith { [_ctrl] call _noTarget};
  26. if (_target isKindOf "man") exitWith { [_ctrl] call _noTarget};
  27. _title = "TargetType: ";
  28. _text = "";
  29.  
  30. if (_target isKindOf "ship") then
  31. {
  32. _text = "Ship"
  33. }
  34. else
  35. {
  36. if (_target isKindOf "tank") then
  37. {
  38. _text = "Armored"
  39. }
  40. else
  41. {
  42. if (_target isKindOf "car") then
  43. {
  44. _text = "Car"
  45. };
  46. };
  47. };
  48.  
  49. _ctrl ctrlSetText _title + _text;
  50. _ctrl ctrlCommit 0.1;
  51. true
  52. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement