Skip to content

Instantly share code, notes, and snippets.

@Neefay
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save Neefay/ceb85072a485438ee119 to your computer and use it in GitHub Desktop.

Select an option

Save Neefay/ceb85072a485438ee119 to your computer and use it in GitHub Desktop.
Blocks third person
mission_allow_tp_veh = "everyone";
if (difficultyEnabled "3rdPersonView") then {
while {(mission_allow_tp_veh != "everyone")} do {
_veh = (vehicle player);
_inVeh = (_veh != player);
_isTP = (cameraView == "EXTERNAL");
_isDriving = (((player == commander _veh) || (player == driver _veh)) && (_inVeh));
if (_isTP) then {
if (mission_allow_tp_veh == "disabled") then {
_veh switchCamera "INTERNAL";
} else {
if (!(_isDriving)) then {
_veh switchCamera "INTERNAL";
};
};
};
sleep 0.01;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment