Jump to content

The old extra right click "extra_rc.hpp" for 1.6


juandayz

Recommended Posts

It does not work for me (...

my  extra_rc.hpp

Spoiler

class ExtraRc {
 
  class ItemKnife {
     class drinkblood {
        text = "DrinkMyBlood";
        script = "execVM 'custom\drinkblood.sqf'";
     };
  };
    
    class Binocular {
     class viewdistanceTitle {
            text = "Дальность видимости:";
            script = "systemChat('Выберите подходящую для вас дистанцию видимости');";
        };
        class distance300m {
            text = "300 метров";
            script = "setViewDistance 300; systemChat('Дальность видимости: 300');";
        };
        class distance500m {
            text = "500 метров";
            script = "setViewDistance 500; systemChat('Дальность видимости: 500');";
        };
        class distance1000m {
            text = "1000 метров";
            script = "setViewDistance 1000; systemChat('Дальность видимости: 1000');";
        };
        class distance1600m {
            text = "1600 метров - Стандарт";
            script = "setViewDistance 1600; systemChat('Дальность видимости: 1600');";
        };
        class distance2000m {
            text = "2000 метров";
            script = "setViewDistance 2000; systemChat('Дальность видимости: 2000'); systemChat('Внимание: Высокая дальность видимости снизит FPS');";
        }; /*
        class distance3000m {
            text = "3000 метров";
            script = "setViewDistance 3000; systemChat('Дальность видимости: 3000'); systemChat('Внимание: Высокая дальность видимости снизит FPS');";
        }; /*
        class terraingridTitle {
            text = "Трава:";
            script = "systemChat('Дальность видимости');";
        };
        class terraingrid50 {
            text = "Отключить";
            script = "setTerrainGrid 50; systemChat('Детализация травы: Низкая. Трава отключена. Наилучший FPS');";
        };
        class terraingrid25 {
            text = "Включить";
            script = "setTerrainGrid 25; systemChat('Детализация травы: Средняя');";
        }; */
    };
    
    class Binocular_Vector {
        class viewdistanceTitle {
            text = "Дальность видимости:";
            script = "systemChat('Выберите подходящую для вас дистанцию видимости');";
        };
        class distance300m {
            text = "300 метров";
            script = "setViewDistance 300; systemChat('Дальность видимости: 300');";
        };
        class distance500m {
            text = "500 метров";
            script = "setViewDistance 500; systemChat('Дальность видимости: 500');";
        };
        class distance1000m {
            text = "1000 метров";
            script = "setViewDistance 1000; systemChat('Дальность видимости: 1000');";
        };
        class distance1600m {
            text = "1600 метров - Стандарт";
            script = "setViewDistance 1600; systemChat('Дальность видимости: 1600');";
        };
        class distance2000m {
            text = "2000 метров";
            script = "setViewDistance 2000; systemChat('Дальность видимости: 2000'); systemChat('Внимание: Высокая дальность видимости снизит FPS');";
        };
        class distance3000m {
            text = "3000 метров";
            script = "setViewDistance 3000; systemChat('Дальность видимости: 3000'); systemChat('Внимание: Высокая дальность видимости снизит FPS');";
        }; /*
        class terraingridTitle {
            text = "Трава:";
            script = "systemChat('Дальность видимости');";
        };
        class terraingrid50 {
            text = "Отключить";
            script = "setTerrainGrid 50; systemChat('Детализация травы: Низкая. Трава отключена. Наилучший FPS');";
        };
        class terraingrid25 {
            text = "Включить";
            script = "setTerrainGrid 25; systemChat('Детализация травы: Средняя');";
        }; */
    };

};

 

Link to comment
Share on other sites

3 minutes ago, koriaba said:

and drawing range does not work, nothing at all.

also you can try.

custom\setview\250.sqf

Spoiler

setviewdistance 250;
bis_fog = 0;

setviewdistance 250;
0 setovercast 0;
0 setrain 1;
0 setfog bis_fog
systemChat("Дальность видимости: 200");

 

 

extra_rc.hpp

Spoiler


class ExtraRc {
 
  class ItemKnife {
     class drinkblood {
        text = "DrinkMyBlood";
        script = "execVM 'custom\drinkblood.sqf'";
     };
  };
    
    class Binocular {
     class distanceb200m {
            text = "200 метров";
            script = "execVM 'custom\setview\250.sqf'";
        };
    };
    
    class Binocular_Vector {        
        class distancea200m {
            text = "200 метров";
            script = "execVM 'custom\setview\250.sqf'";
        };
    };

};

if drinkmyblood  dssn t work then you have something bad in your process to install :smile:

Link to comment
Share on other sites

56 minutes ago, koriaba said:

installed  DEPLOYABLE BIKE 2.8.2

so you have something wrong in install process... i was writing something new using extra_rc and works... any way deploy anything is better to deploy objects and all of this :)

Link to comment
Share on other sites

One note for those who cannot get this working... I had issues when I personally did not read the instructions properly. In step 2, it says:

B- open this new  custom ui_selectslot.sqf  and find:

_pos set [3,_height];

above it paste: <blah>

If you paste below that line it does not work. Has to be pasted above...

And now it works great for me...

Link to comment
Share on other sites

thers no much to explain :sad:

heres my

ui_selectSlot.sqf
Spoiler

//private ["_control","_button","_parent","_group","_pos","_item","_conf","_name","_cfgActions","_numActions","_height","_menu","_config","_type","_script","_outputOriented","_compile","_array","_outputClass","_outputType"];
disableSerialization;
_control = _this select 0;
_button = _this select 1;
_parent = findDisplay 106;

if (carryClick) then {carryClick = false;};

if (_button == 1) then {
    private ["_conf","_name","_compile","_height","_item"];
    _group = _parent displayCtrl 6902;

    _pos = ctrlPosition _group;

    _item = gearSlotData _control;    
    if ( //No right click action
        (!DZE_SelfTransfuse && _item in ["ItemBloodbag","wholeBloodBagANEG","wholeBloodBagAPOS","wholeBloodBagBNEG","wholeBloodBagBPOS","wholeBloodBagABNEG","wholeBloodBagABPOS","wholeBloodBagONEG","wholeBloodBagOPOS"]) or
        (!dayz_groupSystem && _item == "ItemRadio")
    ) exitWith {};
    if (mouseOverCarry) then {
        _item = DayZ_onBack;
        carryClick = true;
    };

    _pos set [0,((_this select 2) + 0.46)];
    _pos set [1,((_this select 3) + 0.07)];

    _conf = configFile >> "cfgMagazines" >> _item;
    if (!isClass _conf) then {
        _conf = configFile >> "cfgWeapons" >> _item;
    };
    _name = getText(_conf >> "displayName");

    _cfgActions = _conf >> "ItemActions";
    _numActions = (count _cfgActions);
    _height = 0;

    //Populate Menu
    for "_i" from 0 to (_numActions - 1) do
    {
        _menu = _parent displayCtrl (1600 + _i);
        _menu ctrlShow true;
        _config = (_cfgActions select _i);
        _type = getText (_config >> "text");
        _script = getText (_config >> "script");
        _outputOriented = getNumber (_config >> "outputOriented") == 1;
        _height = _height + (0.025 * safezoneH);
        _compile = format["_id = '%2' %1;",_script,_item];
        uiNamespace setVariable ['uiControl', _control];
        if (_outputOriented) then {
            /*
                This flag means that the action is output oriented
                the output class will then be transferred to the script
                and the type used for the name
            */
            _array = getArray (_config >> "output");
            _outputClass = _array select 0;
            _outputType = _array select 1;
            _name = getText (configFile >> _outputType >> _outputClass >> "displayName");
            _compile = format["_id = ['%2',%3] %1;",_script,_item,_array];
        };

        _menu ctrlSetText format[_type,_name];
        _menu ctrlSetEventHandler ["ButtonClick",_compile];
    };
    
    //EXTRA_RC
    
    _erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item);
    _erc_numActions = (count _erc_cfgActions);
    if (isClass _erc_cfgActions) then {
     for "_j" from 0 to (_erc_numActions - 1) do
     {
       _menu =  _parent displayCtrl (1600 + _j + _numActions);
       _menu ctrlShow true;
       _config =  (_erc_cfgActions select _j);
       _text =  getText (_config >> "text");
       _script =  getText (_config >> "script");
       _height = _height + (0.025 * safezoneH);
       uiNamespace setVariable ['uiControl', _control];
       _menu ctrlSetText _text;
       _menu ctrlSetEventHandler ["ButtonClick",_script];
      };
   };
    //EXTRA_RC

    
    
    _pos set [3,_height];

    //hint format["Obj: %1 \nHeight: %2\nPos: %3",_item,_height,_grpPos];

    _group ctrlShow true;
    ctrlSetFocus _group;
    _group ctrlSetPosition _pos;
    _group ctrlCommit 0;
};

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...
1 hour ago, WagnerMello said:

1-you need this 3 customs files:  compiles.sqf/ui_selectslot.sqf/extra_rc.hpp

all of them must be located into mpmissions\instance_11.chernarus\custom\.

2-now you need change the paths for this 3 custom files.

A-change path for compiles.sqf  in init.sqf

call compile preprocessFileLineNumbers "custom\compiles.sqf";

 

B-change path for ui_selectslot.sqf in custom compiles.sqf

player_selectSlot = compile preprocessFileLineNumbers "custom\ui_selectSlot.sqf";

 

C-add the path for extra_rc.hpp in description.ext (at buttom).

//rc
#include "custom\extra_rc.hpp"

 

3-Paste the code inside of extra_rc.hpp

class ExtraRc {
 
  class ItemToolbox {
     class test {
        text = "test";
        script = "execVM 'custom\extra_test.sqf'";
     };
  }; 
};

4-create the extra_test.sqf and place into mpmissions\instance_11.chernarus\custom\

extra_test.sqf

systemChat("Extra right click test success");
		
player playActionNow "Medic";

5-Edit your custom ui_selectsolot.sqf (add lines in red)

Spoiler

//EXTRA_RC
    
    _erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item);
    _erc_numActions = (count _erc_cfgActions);
    if (isClass _erc_cfgActions) then {
     for "_j" from 0 to (_erc_numActions - 1) do
     {
       _menu =  _parent displayCtrl (1600 + _j + _numActions);
       _menu ctrlShow true;
       _config =  (_erc_cfgActions select _j);
       _text =  getText (_config >> "text");
       _script =  getText (_config >> "script");
       _height = _height + (0.025 * safezoneH);
       uiNamespace setVariable ['uiControl', _control];
       _menu ctrlSetText _text;
       _menu ctrlSetEventHandler ["ButtonClick",_script];
      };
   };
    //EXTRA_RC

    

_pos set [3,_height];

Arm_A2_OA_2016_12_26_18_34_50_27.jpg

Arm_A2_OA_2016_12_26_18_34_57_22.jpg

Link to comment
Share on other sites

On 14-12-2016 at 8:18 PM, koriaba said:

thanks for the answer.
I will try more ..)

Adding Your Own Custom Actions

If you use another right click method like extra_rc.hpp and want to switch to my method, see my click actions configuration github page.

The click actions script is included in the deploy script as part of the core, so you don't need to download anything, just follow the instructions for adding your own actions.

* note: before attempting to troubleshoot issues with adding your own actions, make sure you are using the most recent version of the addon.

Link to comment
Share on other sites

@brody

here you got other script for extra_rc

video:

Spoiler

 

Download and drop into your custom\script\   http://www.mediafire.com/download/6fiknw6aassaxpw/erotic.zip

*Go to your extra_rc.hpp and add:

class ItemGPS {
         class erotic {
            text = "eroticvideo";
            script = "execVM 'custom\script\gps.sqf'";
        };
    }; 

 

Link to comment
Share on other sites

4 minutes ago, juandayz said:

@brody

here you got other script for extra_rc

video:

  Hide contents

 

Download and drop into your custom\script\   http://www.mediafire.com/download/6fiknw6aassaxpw/erotic.zip

*Go to your extra_rc.hpp and add:


class ItemGPS {
         class erotic {
            text = "eroticvideo";
            script = "execVM 'custom\script\gps.sqf'";
        };
    }; 

 

I LOVE YOU :D

Link to comment
Share on other sites

17 minutes ago, juandayz said:

@brody

here you got other script for extra_rc

video:

  Reveal hidden contents

 

Download and drop into your custom\script\   http://www.mediafire.com/download/6fiknw6aassaxpw/erotic.zip

*Go to your extra_rc.hpp and add:


class ItemGPS {
         class erotic {
            text = "eroticvideo";
            script = "execVM 'custom\script\gps.sqf'";
        };
    }; 

 

its a big file :D

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