Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. // [] call Mez_server_fnc_autoTankFlip;
  2. ["Tank_F", "InitPost", {
  3. _tank = (_this select 0);
  4. private _vehicleArray = MEZ_STANDARD_NAMESPACE getVariable ["Mez_Autoflip_vehicleArray", []];
  5. _vehicleArray pushback _tank;
  6. MEZ_STANDARD_NAMESPACE setVariable ["Mez_Autoflip_vehicleArray", _vehicleArray, true]; //Ja, muss nicht ist aber zum debuggen einfacher
  7. }] call CBA_fnc_addClassEventHandler;
  8.  
  9. _AutoFlip = [{
  10. //private _vehicleClassnames = ["B_MBT_01_TUSK_F"];
  11. //private _vehicleArray = vehicles select {typeOf _x in _vehicleClassnames};
  12. private _vehicleArray = MEZ_STANDARD_NAMESPACE getVariable ["Mez_Autoflip_vehicleArray", []];
  13. {
  14. private _tank = _x;
  15. private _velocity = velocity _tank;
  16. if (_velocity#2 >5) then {
  17. private _pos = getPos _tank;
  18. if (_pos#2 > 5 ) then {
  19. private _position = (getPosATL _tank) findEmptyPosition [0, 100, typeOf _tank];
  20. _tank setPos _position;
  21. };
  22. };
  23. } foreach _vehicleArray;
  24.  
  25. }, 0, []] call CBA_fnc_addPerFrameHandler;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement