Guest User

Untitled

a guest
Jan 9th, 2022
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.51 KB | None | 0 0
  1. span class="re5"> addMissionEventHandler ["TeamSwitch", {
  2.   params ["_previousUnit", "_newUnit"];
  3.   commandStop _previousUnit;
  4.   _previousUnit enableAI "TeamSwitch";
  5.   //_azimuth = getDir _previousUnit;
  6.   //_previousUnit setDir _azimuth;
  7.   _from = _this select 0;
  8.   _stance = stance _from;
  9.   _stance = ["UP", "MIDDLE", "DOWN"] param [["STAND", "CROUCH", "PRONE"] find _stance, "AUTO"];
  10.   _from setUnitPos _stance;
  11.   if (
  12.     not ( isPlayer (leader group _newUnit) )
  13.   ) then {
  14.     (group _newUnit) selectLeader _newUnit;
  15.   };
  16. }];
Advertisement
Add Comment
Please, Sign In to add comment