English Solved ACE interaction (for store or process or licenses and more for RP e.g. car dealership)

Good evening, how can I open a store or execute a processor with ACE interaction I found this
Code:
 [this, localize "STR_MAR_Process_Sand", "", life_fnc_processAction, ["sand"], life_inv_sand > 0 && !life_is_processing && !life_action_inUse] call ace_interact_menu_fnc_addAction;

[this, format ["%1 ($%2)", localize (getText(missionConfigFile >> "Licenses" >> "sand" >> "displayName")), [(getNumber(missionConfigFile >> "Licenses" >> "sand" >> "price"))] call life_fnc_numberText], "", life_fnc_buyLicense, ["sand"], ! license_civ_sand && playerSide isEqualTo civilian] call ace_interact_menu_fnc_addAction;
Posté par @andre.k via discord.
 
Dernière édition par un modérateur:
Solution
Hello, you need to create an ace action from a new mod :
Example :
Code:
class cfgVehicles
{
    class Man;
    class CAManBase: Man
    {
        class ACE_Actions
        {
            class ACE_MainActions
            {
                class ACE_Target
                {
                    displayName = "Vendre à ce joueur";
                    distance = 4;
                    condition = "isNull zs_company_target && zs_company_selling";
                    statement = "[_target] spawn zs_company_fnc_designTarget;";
                    exceptions[] = {"isNotSwimming"};
                    showDisabled = 0;
                    priority = 2.7;
                };
            };
        };
    };
};
--- This message was automatically generated by ChatGPT, the content may be incorrect. Please read the message with precautions! ---

Good evening! The code you posted is using the ACE interaction system to add actions for processing sand and buying a license. Make sure you have ACE and that the functions being called (like life_fnc_processAction and life_fnc_buyLicense) are defined in your mission. This code should help you set up interactions for a car dealership or any other RP scenario in Arma 3. Good luck with your project!

--- To continue the discussion with ChatGPT, click "Reply" at the bottom right of this message. Otherwise, wait for someone to reply. ---
 
Hello, you need to create an ace action from a new mod :
Example :
Code:
class cfgVehicles
{
    class Man;
    class CAManBase: Man
    {
        class ACE_Actions
        {
            class ACE_MainActions
            {
                class ACE_Target
                {
                    displayName = "Vendre à ce joueur";
                    distance = 4;
                    condition = "isNull zs_company_target && zs_company_selling";
                    statement = "[_target] spawn zs_company_fnc_designTarget;";
                    exceptions[] = {"isNotSwimming"};
                    showDisabled = 0;
                    priority = 2.7;
                };
            };
        };
    };
};
 
Solution