Created
October 19, 2014 23:24
-
-
Save wiking-at/f659abada8ee0fb1e122 to your computer and use it in GitHub Desktop.
1st Person Lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!isDedicated) then { //preventing start on server | |
if (difficultyEnabled "3rdPersonView") then | |
{ | |
while {true} do { | |
waitUntil {cameraView == "EXTERNAL" || cameraView == "GROUP"}; | |
_timeStamp = ["combatTimestamp", -1] call _getPublicVar; | |
_abortDelay = ["A3W_combatAbortDelay", 0] call _getPublicVar; | |
if (((vehicle player) == player) && ((_timeStamp != -1 && diag_tickTime - _timeStamp < _abortDelay)) then { | |
player switchCamera "INTERNAL"; | |
}; | |
sleep 0.1; | |
if (((vehicle player) != player) && (speed (vehicle player)) >= 30) then { | |
(vehicle player) switchCamera "Internal"; | |
}; | |
sleep 0.1; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment