Jump to content
  • 0

Installing the right click options.


speaR

Question

Good evening guys. Cause many people already play on our communitys server and my scripter went to holidays some days ago, i need to do it on my own. I'm not a scripting genuis as you can see.. So what i want to do is installing the right click options by maca http://epochservers.com/viewtopic.php?f=14&t=13 . In his tutorial maca speaks about the compiles.sqf and ui_selectSlot.sqf. The ui_selectSlot.sqf file is added by him so its just copy and paste , isnt it ? But the compiles.sqf is making some problems. I watched differnet tuts about how to create it.. And none realy helped me.. Could one of you guys please post his custom compiles file he uses for the right click system ? Would be very nice!

Greetz

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Good evening guys. Cause many people already play on our communitys server and my scripter went to holidays some days ago, i need to do it on my own. I'm not a scripting genuis as you can see.. So what i want to do is installing the right click options by maca http://epochservers.com/viewtopic.php?f=14&t=13 . In his tutorial maca speaks about the compiles.sqf and ui_selectSlot.sqf. The ui_selectSlot.sqf file is added by him so its just copy and paste , isnt it ? But the compiles.sqf is making some problems. I watched differnet tuts about how to create it.. And none realy helped me.. Could one of you guys please post his custom compiles file he uses for the right click system ? Would be very nice!

Greetz

You need to extract your dayz_code.pbo

You'll find the compile.sqf inside the init folder.

 

As for the ui_selectSlot.sqf, you could download and use the one he provides, but I would suggest just editing yours with the required code so you are used to it, that way if more changes need to be done to that file in the future you're aware how to do it. You can find the ui_selectSlot.sqf in the dayz_code.sqf's compile folder.

 

To edit it, search for...

        _menu ctrlSetText format[_type,_name];
        _menu ctrlSetEventHandler ["ButtonClick",_compile];
    };

Around line 50-60 and place the following code directly below that snippet shown above.

    // Add extra context menus
    _erc_cfgActions = (missionConfigFile >> "INCGUNS" >> _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];
        };
    };

Hope that helped out a bit.

Link to comment
Share on other sites

  • 0

loo

 

You need to extract your dayz_code.pbo

You'll find the compile.sqf inside the init folder.

 

As for the ui_selectSlot.sqf, you could download and use the one he provides, but I would suggest just editing yours with the required code so you are used to it, that way if more changes need to be done to that file in the future you're aware how to do it. You can find the ui_selectSlot.sqf in the dayz_code.sqf's compile folder.

 

To edit it, search for...

        _menu ctrlSetText format[_type,_name];
        _menu ctrlSetEventHandler ["ButtonClick",_compile];
    };

Around line 50-60 and place the following code directly below that snippet shown above.

    // Add extra context menus
    _erc_cfgActions = (missionConfigFile >> "INCGUNS" >> _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];
        };
    };

Hope that helped out a bit.

looks clear for me. I'll try it when I'm back home. And thanks for your effort making this short instruction for me. I'll tell you if it works :-)

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