Jump to content

Binocular Set Range Distance


Brody

Recommended Posts

3 hours ago, juandayz said:

@BZerK0r youre brackets are bad.   Use the code below

  Reveal hidden contents


class ExtraRc {
    class ItemRadio {
        class GroupManagement {
        text = "Group Management";
        script = "execVM 'dzgm\loadGroupManagement.sqf'";
        };
        class switchOnOff {
        text = "Switch ON/OFF";
        script = "execVM 'custom\remote\switch_on_off.sqf'";
        };
    };

        class Binocular {
        class SetView {
        text = "Setview";
        script = "execVM 'custom\setview\setview.sqf'";
                 }; //this close the class Setview
            };   //this close the class  Binocular
             class Binocular_Vector {
                 class SetView2 {
                 text = "Setview";
                 script = "execVM 'custom\setview\setview.sqf'";
                 };  //this close the class SetView2 
        };   //this close the class Binocular_Vector

};//this close the class ExtraRc

 

Thanks again @juandayz. I figured it was my brackets, but I also believe I tried every configuration to try to get it to work (including this one). I have pasted your code into my extra_rc but still no menu when I right click. 

The following is in my \custom\setview\setview.sqf file... I believe I have pasted accurately according to your suggestion, but I'm still getting no menu when rt click on rangefinder:

Spoiler

(FindDisplay 106) closeDisplay 1;
pathtosetview = "custom\setview\";
EXECscript1 = 'player execVM "'+pathtosetview+'%1"';

setview =
[
    ["View Range",true],
        ["500", [2],  "", -5, [["expression", format[EXECscript1,"500.sqf"]]], "1", "1"],
        ["1000", [3],  "", -5, [["expression", format[EXECscript1,"1000.sqf"]]], "1", "1"],
        ["1500", [4],  "", -5, [["expression", format[EXECscript1,"1500.sqf"]]], "1", "1"],                
        ["2000", [5],  "", -5, [["expression", format[EXECscript1,"2000.sqf"]]], "1", "1"],
        ["2500", [6],  "", -5, [["expression", format[EXECscript1,"2500.sqf"]]], "1", "1"],
        ["3000", [7],  "", -5, [["expression", format[EXECscript1,"3000.sqf"]]], "1", "1"],
        ["3500", [8],  "", -5, [["expression", format[EXECscript1,"3500.sqf"]]], "1", "1"],
        ["4000", [9],  "", -5, [["expression", format[EXECscript1,"4000.sqf"]]], "1", "1"],
        ["4500", [10],  "", -5, [["expression", format[EXECscript1,"4500.sqf"]]], "1", "1"],
        ["5000", [11],  "", -5, [["expression", format[EXECscript1,"5000.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
showCommandingMenu "#USER:setview";

 

Thanks again man!!

Link to comment
Share on other sites

19 hours ago, BZerK0r said:

Thanks again @juandayz. I figured it was my brackets, but I also believe I tried every configuration to try to get it to work (including this one). I have pasted your code into my extra_rc but still no menu when I right click. 

The following is in my \custom\setview\setview.sqf file... I believe I have pasted accurately according to your suggestion, but I'm still getting no menu when rt click on rangefinder:

  Reveal hidden contents

(FindDisplay 106) closeDisplay 1;
pathtosetview = "custom\setview\";
EXECscript1 = 'player execVM "'+pathtosetview+'%1"';

setview =
[
    ["View Range",true],
        ["500", [2],  "", -5, [["expression", format[EXECscript1,"500.sqf"]]], "1", "1"],
        ["1000", [3],  "", -5, [["expression", format[EXECscript1,"1000.sqf"]]], "1", "1"],
        ["1500", [4],  "", -5, [["expression", format[EXECscript1,"1500.sqf"]]], "1", "1"],                
        ["2000", [5],  "", -5, [["expression", format[EXECscript1,"2000.sqf"]]], "1", "1"],
        ["2500", [6],  "", -5, [["expression", format[EXECscript1,"2500.sqf"]]], "1", "1"],
        ["3000", [7],  "", -5, [["expression", format[EXECscript1,"3000.sqf"]]], "1", "1"],
        ["3500", [8],  "", -5, [["expression", format[EXECscript1,"3500.sqf"]]], "1", "1"],
        ["4000", [9],  "", -5, [["expression", format[EXECscript1,"4000.sqf"]]], "1", "1"],
        ["4500", [10],  "", -5, [["expression", format[EXECscript1,"4500.sqf"]]], "1", "1"],
        ["5000", [11],  "", -5, [["expression", format[EXECscript1,"5000.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
showCommandingMenu "#USER:setview";

 

Thanks again man!!

mm see the @Shak way .. i think its better and clean

Link to comment
Share on other sites

This thread...lol

 

All of this information is available on both this forum and opendayz, google is your m8 m8.

DZE Clickactions

Spoiler

DZE_CLICK_ACTIONS = [
    ["Binocular","View Distance 500m","setViewDistance 500;","true"],
    ["Binocular","View Distance 1000m","setViewDistance 1000;","true"],
    ["Binocular","View Distance 1500m","setViewDistance 1500;","true"],
    ["Binocular","View Distance 2000m","setViewDistance 2000;","true"],
    ["Binocular","View Distance 2500m","setViewDistance 2500;","true"],
    ["Binocular","View Distance 3000m","setViewDistance 3000;","true"],
    ["Binocular","View Distance 4000m","setViewDistance 4000;","true"],
    ["Binocular","View Distance 5000m","setViewDistance 5000;","true"],
    ["Binocular_Vector","View Distance 500m","setViewDistance 500;","true"],
    ["Binocular_Vector","View Distance 1000m","setViewDistance 1000;","true"],
    ["Binocular_Vector","View Distance 1500m","setViewDistance 1500;","true"],
    ["Binocular_Vector","View Distance 2000m","setViewDistance 2000;","true"],
    ["Binocular_Vector","View Distance 2500m","setViewDistance 2500;","true"],
    ["Binocular_Vector","View Distance 3000m","setViewDistance 3000;","true"],
    ["Binocular_Vector","View Distance 4000m","setViewDistance 4000;","true"],
    ["Binocular_Vector","View Distance 5000m","setViewDistance 5000;","true"]
];

ExtraRC

Spoiler

class ExtraRc {
    class Binocular_Vector  {
        class viewdistanceTitle {
            text = "View Distance:";
            script = "systemChat('Change View Distance Locally. Click on one of the distance options');";
        };
        class distance400m {
            text = "400 Meters";
            script = "setViewDistance 400; systemChat('ViewDistance: 400');";
        };
        class distance600m {
            text = "600 Meters";
            script = "setViewDistance 600; systemChat('ViewDistance: 600');";
        };
        class distance800m {
            text = "800 Meters";
            script = "setViewDistance 800; systemChat('ViewDistance: 800');";
        };
        class distance1000m {
            text = "1000 Meters";
            script = "setViewDistance 1000; systemChat('ViewDistance: 1000');";
        };
        class distance1250m {
            text = "1250 Meters";
            script = "setViewDistance 1250; systemChat('ViewDistance: 1250');";
        };
        class distance1500m {
            text = "1500 Meters";
            script = "setViewDistance 1500; systemChat('ViewDistance: 1500');";
        };
        class distance2000m {
            text = "2000 Meters";
            script = "setViewDistance 2000; systemChat('ViewDistance: 2000'); systemChat('Warning: Higher the view distance Lower the FPS');";
        };
        class distance3000m {
            text = "3000 Meters";
            script = "setViewDistance 3000; systemChat('ViewDistance: 3000'); systemChat('Warning: Higher the view distance Lower the FPS');";
        };
    };
    class Binocular {
        class viewdistanceTitle {
            text = "View Distance:";
            script = "systemChat('Change View Distance Locally. Click on one of the distance options');";
        };
        class distance400m {
            text = "400 Meters";
            script = "setViewDistance 400; systemChat('ViewDistance: 400');";
        };
        class distance600m {
            text = "600 Meters";
            script = "setViewDistance 600; systemChat('ViewDistance: 600');";
        };
        class distance800m {
            text = "800 Meters";
            script = "setViewDistance 800; systemChat('ViewDistance: 800');";
        };
        class distance1000m {
            text = "1000 Meters";
            script = "setViewDistance 1000; systemChat('ViewDistance: 1000');";
        };
        class distance1250m {
            text = "1250 Meters";
            script = "setViewDistance 1250; systemChat('ViewDistance: 1250');";
        };
        class distance1500m {
            text = "1500 Meters";
            script = "setViewDistance 1500; systemChat('ViewDistance: 1500');";
        };
        class distance2000m {
            text = "2000 Meters";
            script = "setViewDistance 2000; systemChat('ViewDistance: 2000'); systemChat('Warning: Higher the view distance Lower the FPS');";
        };
        class distance3000m {
            text = "3000 Meters";
            script = "setViewDistance 3000; systemChat('ViewDistance: 3000'); systemChat('Warning: Higher the view distance Lower the FPS');";
        };
    };
};

 

Link to comment
Share on other sites

  • 1 month later...

This thread confuse me well ....... I try to get a viewdistance changer working. My thought was the following:

I have deploy anything installed. In the folder overrides/click_actions is a file called config.sqf.

In the config.sqf are the following rows:

DZE_CLICK_ACTIONS = [
    ["ItemGPS","Scan Nearby","if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_ZOMBIE_COUNT = count ((position player) nearEntities ['zZombie_Base',DZE_CLICK_ACTIONS_GPS_RANGE]); DZE_CLICK_ACTIONS_MAN_COUNT = count ((position player) nearEntities ['CAManBase',DZE_CLICK_ACTIONS_GPS_RANGE]);cutText[format['Within %1 Meters: %2 AI/players, %3 zombies, %4 vehicles',DZE_CLICK_ACTIONS_GPS_RANGE,DZE_CLICK_ACTIONS_MAN_COUNT - DZE_CLICK_ACTIONS_ZOMBIE_COUNT,count ((position player) nearEntities ['zZombie_Base',DZE_CLICK_ACTIONS_GPS_RANGE]),count ((position player) nearEntities ['allVehicles',DZE_CLICK_ACTIONS_GPS_RANGE]) - DZE_CLICK_ACTIONS_MAN_COUNT],'PLAIN DOWN'];","true"],
    ["ItemGPS","Range Up"   ,"if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_GPS_RANGE = (DZE_CLICK_ACTIONS_GPS_RANGE + 100) min 2500; cutText[format['GPS RANGE: %1',DZE_CLICK_ACTIONS_GPS_RANGE],'PLAIN DOWN'];","true"],
    ["ItemGPS","Range Down" ,"if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_GPS_RANGE = (DZE_CLICK_ACTIONS_GPS_RANGE - 100) max 1000;  cutText[format['GPS RANGE: %1',DZE_CLICK_ACTIONS_GPS_RANGE],'PLAIN DOWN'];","true"],
    ["ItemGPS","Toggle Map Marker","execVM 'overwrites\click_actions\examples\marker.sqf';","true"],
    ["ItemMap","Toggle Map Marker","execVM 'overwrites\click_actions\examples\marker.sqf';","true"]
];

My idea was to insert a row like ["ItemBinocular","Set View Distance","execVM 'overwrites\click_actions\examples\setview.sqf';","true"]

Now I need a new file called setview.sqf ............ but I have no idea what should in there.

As I wrote ....... it was just a idea from a noob ........

 

Link to comment
Share on other sites

Did you not see the post above yours?

 

Spoiler

DZE_CLICK_ACTIONS = [
    ["ItemGPS","Scan Nearby","if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_ZOMBIE_COUNT = count ((position player) nearEntities ['zZombie_Base',DZE_CLICK_ACTIONS_GPS_RANGE]); DZE_CLICK_ACTIONS_MAN_COUNT = count ((position player) nearEntities ['CAManBase',DZE_CLICK_ACTIONS_GPS_RANGE]);cutText[format['Within %1 Meters: %2 AI/players, %3 zombies, %4 vehicles',DZE_CLICK_ACTIONS_GPS_RANGE,DZE_CLICK_ACTIONS_MAN_COUNT - DZE_CLICK_ACTIONS_ZOMBIE_COUNT,count ((position player) nearEntities ['zZombie_Base',DZE_CLICK_ACTIONS_GPS_RANGE]),count ((position player) nearEntities ['allVehicles',DZE_CLICK_ACTIONS_GPS_RANGE]) - DZE_CLICK_ACTIONS_MAN_COUNT],'PLAIN DOWN'];","true"],
    ["ItemGPS","Range Up"   ,"if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_GPS_RANGE = (DZE_CLICK_ACTIONS_GPS_RANGE + 100) min 2500; cutText[format['GPS RANGE: %1',DZE_CLICK_ACTIONS_GPS_RANGE],'PLAIN DOWN'];","true"],
    ["ItemGPS","Range Down" ,"if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_GPS_RANGE = (DZE_CLICK_ACTIONS_GPS_RANGE - 100) max 1000;  cutText[format['GPS RANGE: %1',DZE_CLICK_ACTIONS_GPS_RANGE],'PLAIN DOWN'];","true"],
    ["ItemGPS","Toggle Map Marker","execVM 'overwrites\click_actions\examples\marker.sqf';","true"],
    ["ItemMap","Toggle Map Marker","execVM 'overwrites\click_actions\examples\marker.sqf';","true"],
    ["Binocular","View Distance 500m","setViewDistance 500;","true"],
    ["Binocular","View Distance 1000m","setViewDistance 1000;","true"],
    ["Binocular","View Distance 1500m","setViewDistance 1500;","true"],
    ["Binocular","View Distance 2000m","setViewDistance 2000;","true"],
    ["Binocular","View Distance 2500m","setViewDistance 2500;","true"],
    ["Binocular","View Distance 3000m","setViewDistance 3000;","true"],
    ["Binocular","View Distance 4000m","setViewDistance 4000;","true"],
    ["Binocular","View Distance 5000m","setViewDistance 5000;","true"],
    ["Binocular_Vector","View Distance 500m","setViewDistance 500;","true"],
    ["Binocular_Vector","View Distance 1000m","setViewDistance 1000;","true"],
    ["Binocular_Vector","View Distance 1500m","setViewDistance 1500;","true"],
    ["Binocular_Vector","View Distance 2000m","setViewDistance 2000;","true"],
    ["Binocular_Vector","View Distance 2500m","setViewDistance 2500;","true"],
    ["Binocular_Vector","View Distance 3000m","setViewDistance 3000;","true"],
    ["Binocular_Vector","View Distance 4000m","setViewDistance 4000;","true"],
    ["Binocular_Vector","View Distance 5000m","setViewDistance 5000;","true"]
];

 

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...