DonkeyPunch Community Gaming

Community Forums => DPCG Releases => Exile Addons + Scripts => Topic started by: DirtySanchez on April 23, 2016, 06:36:56 PM

Title: Updated Exile First Person View during Combat script
Post by: DirtySanchez on April 23, 2016, 06:36:56 PM
Helped to update the script for the latest Arma 3 update 1.58.
See original thread here http://www.exilemod.com/topic/12944-releaseexile-1st-person-in-combat-mode/?do=findComment&comment=87768 (http://www.exilemod.com/topic/12944-releaseexile-1st-person-in-combat-mode/?do=findComment&comment=87768)

Here is the corrected code. save this as viewrestriction.sqf then in the init.sqf just [] execVM "viewrestriction.sqf";
Code: [Select]
if (!isDedicated) then {

    waitUntil {!isNull (findDisplay 46)};

    if ((difficultyOption "thirdPersonView")==1) then
    {
        while {true} do {

            waitUntil {cameraView == "EXTERNAL" || cameraView == "GROUP"};

            if (ExileClientPlayerIsInCombat) then {
                player switchCamera "INTERNAL";
            };
            sleep 0.1;

         };
    };

};