Jump to content
  • 0

How to add "Skript"  to file .hpp?


nikas455

Question

How to add "Script.sqf"  to file .hpp?

Script.sqf:

if (typeName (_settings select 15) == "SCALAR") then
{
	_sMenuAddAction = player addaction["<t color='#D13B3B'>{FTG}</t> abc-small", { _this select 3 call SC_fnc_sMenuOpen }, _settings,-1,false,true,"", ""];
};

.hpp:

class menuinfo : w_RscButton {
            idc = -1;
            text = "abs-small";
            onButtonClick = "HERE";
            x = 0.158; y = 0.57;
            w = 0.235; h = 0.033 * safezoneH;
        };

onButtonClick = "";   add here Script.sqf

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

onButtonClick = "((ctrlParent (_this select 0)) closeDisplay 7780); ExecVM 'MY\PATH\script.sqf';";

7780 is the number of the display, if you want to close it

so basically

class menuinfo : w_RscButton {
            idc = -1;
            text = "abs-small";
            onButtonClick = "HERE";
            x = 0.158; y = 0.57;
            w = 0.235; h = 0.033 * safezoneH;
	    onButtonClick = "((ctrlParent (_this select 0)) closeDisplay 7780); ExecVM 'MY\PATH\script.sqf';";
        };
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
  • Advertisement
  • Discord

×
×
  • Create New...