Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // [] call Mez_server_fnc_autoTankFlip;
- ["Tank_F", "InitPost", {
- _tank = (_this select 0);
- private _vehicleArray = MEZ_STANDARD_NAMESPACE getVariable ["Mez_Autoflip_vehicleArray", []];
- _vehicleArray pushback _tank;
- MEZ_STANDARD_NAMESPACE setVariable ["Mez_Autoflip_vehicleArray", _vehicleArray, true]; //Ja, muss nicht ist aber zum debuggen einfacher
- }] call CBA_fnc_addClassEventHandler;
- _AutoFlip = [{
- //private _vehicleClassnames = ["B_MBT_01_TUSK_F"];
- //private _vehicleArray = vehicles select {typeOf _x in _vehicleClassnames};
- private _vehicleArray = MEZ_STANDARD_NAMESPACE getVariable ["Mez_Autoflip_vehicleArray", []];
- {
- private _tank = _x;
- private _velocity = velocity _tank;
- if (_velocity#2 >5) then {
- private _pos = getPos _tank;
- if (_pos#2 > 5 ) then {
- private _position = (getPosATL _tank) findEmptyPosition [0, 100, typeOf _tank];
- _tank setPos _position;
- };
- };
- } foreach _vehicleArray;
- }, 0, []] call CBA_fnc_addPerFrameHandler;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement