Français Solved Ajouter des options pour les pompiers dans le Radial Menu

20/11/20
243
4
6
1 100
Bonjour,
je souhaiterais rajouter dans le Radial Menu la possibilité aux sapeurs-pompiers de pouvoir forcer, fermer et voir le propriétaire d'une maison serait-il possible de m'aider merci d'avance!
 
Dernière édition:
Solution
Hello! Il faut ajouter un nouveau menu dans Radial Menu, dans le config_button.cpp (avant le dernier };) :
Code:
class med_house_menu {
    class button_1 {
        displayName = "STR_pInAct_BreakDown";
        buttonAction = "[cursorObject] spawn life_fnc_copBreakDoor; closeDialog 0;";
        buttonToolTip = "";
        side[] = {guer};
        disable = false;
        condition = "!isNil {cursorObject getVariable 'house_owner'}";
    };

    class button_2 {
        displayName = "STR_pInAct_SearchHouse";
        buttonAction = "[cursorObject] spawn life_fnc_raidHouse; closeDialog 0;";
        buttonToolTip = "";
        side[] = {guer};
        disable = false;
        condition = "!(player distance cursorObject > 15) &&...
Hello! Il faut ajouter un nouveau menu dans Radial Menu, dans le config_button.cpp (avant le dernier };) :
Code:
class med_house_menu {
    class button_1 {
        displayName = "STR_pInAct_BreakDown";
        buttonAction = "[cursorObject] spawn life_fnc_copBreakDoor; closeDialog 0;";
        buttonToolTip = "";
        side[] = {guer};
        disable = false;
        condition = "!isNil {cursorObject getVariable 'house_owner'}";
    };

    class button_2 {
        displayName = "STR_pInAct_SearchHouse";
        buttonAction = "[cursorObject] spawn life_fnc_raidHouse; closeDialog 0;";
        buttonToolTip = "";
        side[] = {guer};
        disable = false;
        condition = "!(player distance cursorObject > 15) && !isNil {cursorObject getVariable 'house_owner'} && {cursorObject isKindOf ""House""}";
    };

    class button_3 {
        displayName = "STR_pInAct_LockHouse";
        buttonAction = "[cursorObject] spawn life_fnc_lockupHouse; closeDialog 0;";
        buttonToolTip = "";
        side[] = {guer};
        disable = false;
        condition = "!isNil {cursorObject getVariable 'house_owner'}";
    };
};

Puis pour l'ouvrir il faut modifier ton fn_actionKeyHandler.sqf :
Code:
switch (side player) do {
    case civilian: {["house_menu"] spawn CBX_fnc_openInteraction;};
    case west: {["cop_house_menu"] spawn CBX_fnc_openInteraction;};
    default {};
};
pour ajouter un cas pour les pompiers :
Code:
switch (side player) do {
    case civilian: {["house_menu"] spawn CBX_fnc_openInteraction;};
    case west: {["cop_house_menu"] spawn CBX_fnc_openInteraction;};
    case independent: {["med_house_menu"] spawn CBX_fnc_openInteraction;};
    default {};
};
 
Solution