Jump to content
  • 0

view distance script


samnotts

Question

8 answers to this question

Recommended Posts

  • 0

in extra_rc.hpp

Spoiler

class Binocular_Vector  {
        class distance800m {
            text = "800 Metres";
            script = "setViewDistance 800; PlayerViewDistance = 800; systemChat('Attention! You have the draw distance (visibility): 800 Metres');";
        };
        class distance1000m {
            text = "1000 Metres (Default)";
            script = "setViewDistance 1000; PlayerViewDistance = 1000; systemChat('Attention! You have the draw distance (visibility): 1000 Metres');";
        };
        class distance1200m {
            text = "1200 Metres";
            script = "setViewDistance 1200; PlayerViewDistance = 1200; systemChat('Attention! You have the draw distance (visibility):  1200 Metres');";
        };
        class distance1600m {
            text = "1600 Metres";
            script = "setViewDistance 1600; PlayerViewDistance = 1600; systemChat('Attention! You have the draw distance (visibility): 1600 Metres');";
        };
        class distance2000m {
            text = "2000 Metres";
            script = "setViewDistance 2000; PlayerViewDistance = 2000; systemChat('Attention! You have the draw distance (visibility): 2000 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };
        class distance2500m {
            text = "2500 Metres";
            script = "setViewDistance 2500; PlayerViewDistance = 2500; systemChat('Attention! You have the draw distance (visibility):  2500 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };
        class distance3000m {
            text = "3000 Metres";
            script = "setViewDistance 3000; PlayerViewDistance = 3000; systemChat('Attention! You have the draw distance (visibility):  3000 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };
        class distance4000m {
            text = "4000 Metres";
            script = "setViewDistance 4000; PlayerViewDistance = 4000; systemChat('Attention! You have the draw distance (visibility):  4000 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };
        class distance5000m {
            text = "5000 Metres";
            script = "setViewDistance 5000; PlayerViewDistance = 5000; systemChat('Attention! You have the draw distance (visibility):  5000 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };        
    };

Spoiler

class Binocular {
        class distance800m {
            text = "800 Metres";
            script = "setViewDistance 800; PlayerViewDistance = 800; systemChat('Attention! You have the draw distance (visibility): 800 Metres');";
        };
        class distance1000m {
            text = "1000 Metres (Default)";
            script = "setViewDistance 1000; PlayerViewDistance = 1000; systemChat('Attention! You have the draw distance (visibility): 1000 Metres');";
        };
        class distance1200m {
            text = "1200 Metres";
            script = "setViewDistance 1200; PlayerViewDistance = 1200; systemChat('Attention! You have the draw distance (visibility):  1200 Metres');";
        };
        class distance1600m {
            text = "1600 Metres";
            script = "setViewDistance 1600; PlayerViewDistance = 1600; systemChat('Attention! You have the draw distance (visibility): 1600 Metres');";
        };
        class distance2000m {
            text = "2000 Metres";
            script = "setViewDistance 2000; PlayerViewDistance = 2000; systemChat('Attention! You have the draw distance (visibility): 2000 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };
        class distance2500m {
            text = "2500 Metres";
            script = "setViewDistance 2500; PlayerViewDistance = 2500; systemChat('Attention! You have the draw distance (visibility):  2500 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };
        class distance3000m {
            text = "3000 Metres";
            script = "setViewDistance 3000; PlayerViewDistance = 3000; systemChat('Attention! You have the draw distance (visibility):  3000 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };
        class distance4000m {
            text = "4000 Metres";
            script = "setViewDistance 4000; PlayerViewDistance = 4000; systemChat('Attention! You have the draw distance (visibility):  4000 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };
        class distance5000m {
            text = "5000 Metres";
            script = "setViewDistance 5000; PlayerViewDistance = 5000; systemChat('Attention! You have the draw distance (visibility):  5000 Metres'); systemChat('Remember that high visibility range affects performance and FPS!');";
        };        
    };

 

Link to comment
Share on other sites

  • 0
Just now, samnotts said:

is that in @dayz_epoch or dayz_epoch_server files

 

you need create a extra_rc.hpp is not in pbo files.  any way.. here you have another way.

 

create setview.sqf (put in mpmissions\your instance\setview\)

Spoiler

_sv = 'setviewdistance %1;';



setview =
[
	["SETVIEW MENU",true],
					
	
		["SETVIEW>>", [], "#USER:SVD", -5, [["expression", ""]], "1", "1"],
		
            ["", [], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];

SVD =
[
	["",true],
        ["250M", [2],  "", -5, [["expression", format[_sv ,"250"]]], "1", "1"],
        ["500M", [3],  "", -5, [["expression", format[_sv ,"500"]]], "1", "1"],
        ["750M", [4],  "", -5, [["expression", format[_sv ,"750"]]], "1", "1"],
        ["1000M", [5],  "", -5, [["expression", format[_sv ,"1000"]]], "1", "1"],
        ["1250M", [6],  "", -5, [["expression", format[_sv ,"1250"]]], "1", "1"],
        ["1500M", [7],  "", -5, [["expression", format[_sv ,"1500"]]], "1", "1"],
        ["1750M", [8],  "", -5, [["expression", format[_sv ,"1750"]]], "1", "1"],
        ["2000M", [9],  "", -5, [["expression", format[_sv ,"2000"]]], "1", "1"],
		["2250M", [10],  "", -5, [["expression", format[_sv ,"2250"]]], "1", "1"],
		["2500M", [11],  "", -5, [["expression", format[_sv ,"2500"]]], "1", "1"],
            ["", [-1], "", -5, [["expression", ""]], "1", "0"],            
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];


showCommandingMenu "#USER:setview";

 

2-Now you need a custom keyboard.sqf  (If u have one skip it and proceed with step 3)

Spoiler

open \@DayZ_Epoch\addons\dayz_code\compile\  and copy the keyboard.sqf into mpmissions\your instance\

3-YOu need a custom compiles.sqf .. im sure you have one...  open it.

Spoiler

find this lines:


if (!isDedicated) then {
	diag_log "Loading custom client compiles";

and below paste:


DZ_KeyDown_EH = compile preprocessFileLineNumbers "keyboard.sqf";

 

4-Now open your new custom keyboard.sqf.   at bottom but before the last "_handled" paste:

if (_dikCode == 0x3C) then {execVM "setview\setview.sqf";};//setview MENU F2

now go in game and press F2 to open the setview menu.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...