Français Solved Comment ajouter des boutons sur le menu radial avec ACE

  • Auteur de la discussion Auteur de la discussion Aryles
  • Date de début Date de début

Aryles

User
23/8/22
209
5
9
800
22
France
discord.gg
Bonsoir je viens vous voir pour Plusieurs question assez débile sur l'ajouts de boutons ou autre sur le Radial Menu et IPhone.

1. J'aimerais savoir comment rajouter des buttons sur le radial menue pour tous ce qu'il touche mes anim de personnage du genre signe Jul ect ect . ( en Utilisant ACE)

2. J'ai le Scripts placables menu (https://github.com/AltisDev/wiki/blob/master/tutoriels-life-version-5/menu-dobjets-placables.md) et j'aimerais le relier à l'Iphone XI pour éviter plusieurs touches.

3. Depuis que j'ai installer le FuelStations j'ai cette erreur (ci dessous) récurrente qui s'affiche sur les Logs sachent que je n'est rien Modifier du scripts appart rajouter des items


unknown.png




[CODE lang="cpp" title="Config Master"]/*
Author: Maxence
Web site: www.the-programmer.com
Discord: https://discord.the-programmer.com

Terms of use:
- This file is forbidden unless you have permission from the author. If you have this file without permission to use it please do not use it and do not share it.
- If you have permission to use this file, you can use it on your server however it is strictly forbidden to share it.
- Out of respect for the author please do not delete this information.
*/
#define true 1
#define false 0

class Max_Settings_FuelStations {
default_lang = "fr"; // fr / en / de / es

textures_base_path = "The-Programmer\FuelStations\textures"; // If you move the textures to another location or in a mod keep the folder structure and file names the same in the current textures folder
license_refuel_stations = "license_civ_pump"; // this license is required to refuel a pump [and win money :)]

enable_more_fuel_consumption = true; // true/false - if you put true the vehicles will consume more fuel
more_consumption_coefficent = 200; // This value does not really make sense, reduce it to reduce consumption, increase it to increase consumption

refuel_car_time_per_liter = 0.5; // Default 0.5 seconds, for 10 liters it will take 5 seconds, for 30 liters it will take 15 seconds
refuel_pump_time_per_liter = 0.25; // Default 0.25 seconds, for 100 liters it will take 25 seconds, for 300 liters it will take 75 seconds

class fuel_stations {
class Land_FuelStation_01_pump_malevil_F { // class = classname of the fuel pump
fuel_1 = 2000; // number of liter by default and maximum per fuel per pump for the item who have as class "fuel_1" (fuel types are defined below the stations)
fuel_2 = 2000;
fuel_3 = 2000;
fuel_4 = 2000;
fuel_5 = 2000;
fuel_6 = 2000;
fuel_7 = 2000;
fuel_8 = 0;
fuel_9 = 2000;
fuel_10 = 2000;
fuel_11 = 2000;
fuel_12 = 2000;
fuel_12 = 2000;
fuel_14 = 0;
};
class Land_FuelStation_01_pump_F {
fuel_1 = 2000; // number of liter by default and maximum per fuel per pump for the item who have as class "fuel_1" (fuel types are defined below the stations)
fuel_2 = 2000;
fuel_3 = 2000;
fuel_4 = 2000;
fuel_5 = 2000;
fuel_6 = 2000;
fuel_7 = 2000;
fuel_8 = 0;
fuel_9 = 2000;
fuel_10 = 2000;
fuel_11 = 2000;
fuel_12 = 2000;
fuel_12 = 2000;
fuel_14 = 0;
};
class Land_FuelStation_02_pump_F {
fuel_1 = 2000; // number of liter by default and maximum per fuel per pump for the item who have as class "fuel_1" (fuel types are defined below the stations)
fuel_2 = 2000;
fuel_3 = 2000;
fuel_4 = 2000;
fuel_5 = 2000;
fuel_6 = 2000;
fuel_7 = 2000;
fuel_8 = 0;
fuel_9 = 2000;
fuel_10 = 2000;
fuel_11 = 2000;
fuel_12 = 2000;
fuel_12 = 2000;
fuel_14 = 0;
};
class Land_fs_feed_F {
fuel_1 = 2000; // number of liter by default and maximum per fuel per pump for the item who have as class "fuel_1" (fuel types are defined below the stations)
fuel_2 = 2000;
fuel_3 = 2000;
fuel_4 = 2000;
fuel_5 = 2000;
fuel_6 = 2000;
fuel_7 = 2000;
fuel_8 = 0;
fuel_9 = 2000;
fuel_10 = 2000;
fuel_11 = 2000;
fuel_12 = 2000;
fuel_12 = 2000;
fuel_14 = 0;
};
class Land_FuelStation_Feed_F {
fuel_1 = 0; // number of liter by default and maximum per fuel per pump for the item who have as class "fuel_1" (fuel types are defined below the stations)
fuel_2 = 0;
fuel_3 = 0;
fuel_4 = 0;
fuel_5 = 0;
fuel_6 = 0;
fuel_7 = 0;
fuel_8 = 0;
fuel_9 = 0;
fuel_10 = 0;
fuel_11 = 0;
fuel_12 = 0;
fuel_12 = 0;
fuel_14 = 10000;
};
};

class fuel_types {
class fuel_1 {
shortName = "Gazole"; // Used in our script : Vehicle Shop
displayName = "Gazole (B7)"; // Not in stringtable ! only the text
item_refuel = "gazole"; // class and variable of the object (in the config_vItems) which makes it possible to fill the fuel station for this type of fuel
liter_price = 15; // price per liter of fuel purchased
liter_price_refuel_station = 12; // price per liter of fuel sold (when you refuel the station)
liters_per_item_refuel_station = 2; // number of liters in one "item_refuel"
};
class fuel_2 {
shortName = "Gazoleb10"; // Used in our script : Vehicle Shop
displayName = "Gazole (B10) Grand Froid"; // Not in stringtable ! only the text
item_refuel = "gazoleb10"; // class and variable of the object (in the config_vItems) which makes it possible to fill the fuel station for this type of fuel
liter_price = 15; // price per liter of fuel purchased
liter_price_refuel_station = 12; // price per liter of fuel sold (when you refuel the station)
liters_per_item_refuel_station = 2; // number of liters in one "item_refuel"
};
class fuel_3 {
shortName = "Gazolextl"; // Used in our script : Vehicle Shop
displayName = "Gazole paraffinique de synthèse (XTL)"; // Not in stringtable ! only the text
item_refuel = "gazolextl"; // class and variable of the object (in the config_vItems) which makes it possible to fill the fuel station for this type of fuel
liter_price = 15; // price per liter of fuel purchased
liter_price_refuel_station = 12; // price per liter of fuel sold (when you refuel the station)
liters_per_item_refuel_station = 2; // number of liters in one "item_refuel"
};
class fuel_4 {
shortName = "SP95";
displayName = "Essence Sans Plomb 95-E5";
item_refuel = "sp95";
liter_price = 9;
liter_price_refuel_station = 6;
liters_per_item_refuel_station = 2;
};
class fuel_5 {
shortName = "SP98";
displayName = "Essence Sans Plomb 98-E5";
item_refuel = "sp98";
liter_price = 12;
liter_price_refuel_station = 9;
liters_per_item_refuel_station = 2;
};
class fuel_6 {
shortName = "SP95E10";
displayName = "Essence Sans Plomb 95-E10";
item_refuel = "sp95e10";
liter_price = 27;
liter_price_refuel_station = 20;
liters_per_item_refuel_station = 2;
};
class fuel_7 {
shortName = "E85";
displayName = "éthanol E85";
item_refuel = "e85";
liter_price = 27;
liter_price_refuel_station = 20;
liters_per_item_refuel_station = 2;
};
class fuel_8 {
shortName = "elec";
displayName = "électricité";
item_refuel = "elec";
liter_price = 17;
liter_price_refuel_station = 14;
liters_per_item_refuel_station = 2;
};
class fuel_9 {
shortName = "gpl";
displayName = "GPL-C";
item_refuel = "gpl";
liter_price = 17;
liter_price_refuel_station = 14;
liters_per_item_refuel_station = 2;
};
class fuel_10 {
shortName = "GNV";
displayName = "Gaz Naturel Véhicule";
item_refuel = "gnv";
liter_price = 11;
liter_price_refuel_station = 8;
liters_per_item_refuel_station = 2;
};
class fuel_11 {
shortName = "h2";
displayName = "Hydrogène";
item_refuel = "h2";
liter_price = 11;
liter_price_refuel_station = 8;
liters_per_item_refuel_station = 2;
};
class fuel_12 {
shortName = "lpg";
displayName = "Gaz de petrole Liquide";
item_refuel = "lpg";
liter_price = 11;
liter_price_refuel_station = 8;
liters_per_item_refuel_station = 2;
};
class fuel_13 {
shortName = "lng";
displayName = "Gaz naturel liquéfier";
item_refuel = "lng";
liter_price = 11;
liter_price_refuel_station = 8;
liters_per_item_refuel_station = 2;
};
class fuel_14 {
shortName = "Kerosene";
displayName = "Kerosene";
item_refuel = "kerosene";
liter_price = 27;
liter_price_refuel_station = 20;
liters_per_item_refuel_station = 2;
};
};
};
[/CODE]
 
Dernière édition:
Solution
Dans ton config_button.cpp (de Radial Menu), dans la class interationCfg il faut ajouter le menu avec les boutons (à modifier) :
Code:
class animations_menu {
    class button_1 {
        displayName = "Bouton 1";
        buttonAction = "hint 'Bouton 1';";
        buttonToolTip = "";
        side[] = {civ,west,guer};
        disable = false;
        condition = "";
    };

    class button_2 {
        displayName = "Bouton 2";
        buttonAction = "hint 'Bouton 2';";
        buttonToolTip = "";
        side[] = {civ,west,guer};
        disable = false;
        condition = "";
    };
};

Puis dans ton fn_actionKeyHandler.sqf remplace ces lignes :
Code:
if ((typeOf _curObject) isEqualTo "Land_Money_F" && {!(_curObject...
Hello ! Hésite pas à faire 1 post par question/problème, c'est plus simple pour répondre et pour retrouver les anciennes discussions.

Pour le point 1, tu précises que tu utilises ACE, est-ce que tu utilises le menu windows de ACE ou Radial Menu du coup ?

Pour le point 2, il y a déjà une application pour ça dans l'Iphone XI. Tu peux définir tes plots et leurs conditions dans le config_master.hpp de l'Iphone :
1664526209250.png

Pour le point 3, comme dis au dessus tu as mis 2 fois "fuel_12" au lieu de "fuel_13"
 
Hello ! Hésite pas à faire 1 post par question/problème, c'est plus simple pour répondre et pour retrouver les anciennes discussions.

Pour le point 1, tu précises que tu utilises ACE, est-ce que tu utilises le menu windows de ACE ou Radial Menu du coup ?

Pour le point 2, il y a déjà une application pour ça dans l'Iphone XI. Tu peux définir tes plots et leurs conditions dans le config_master.hpp de l'Iphone :
Voir la pièce jointe 3403

Pour le point 3, comme dis au dessus tu as mis 2 fois "fuel_12" au lieu de "fuel_13"
Salut Max
Pour les anim je n'utilise que Radial Menu car (pas de bug comme ACE), pour l'Iphone je sais que il y à un menu plots mais j'aimerais utliser le Menu plots qui est installer sur le serveur (comme avant A4l) ps j'ai le Iphone XI car l'Iphone X a le menu appart mais pas le XI pour cella que je te demande :)
 
faisant référence à 2. J'ai le Scripts placables menu (https://github.com/AltisDev/wiki/blob/master/tutoriels-life-version-5/menu-dobjets-placables.md) et j'aimerais le relier à l'Iphone XI pour éviter plusieurs touches.
trouver :
class placeables {
action = "[true] call the_programmer_iphone_xi_fnc_apps_placeableMenu;";
displayName = "STR_APP_PLACEABLE";
condition = "([] call the_programmer_iphone_xi_fnc_apps_placeableCheckConditions)";
iconFile = "icons\work.paa";
};
et remplacer par.
class placeables {
action = "closeDialog 0; [] spawn life_fnc_placeablesMenu;";
displayName = "STR_APP_PLACEABLE";
condition = "";
iconFile = "icons\work.paa";
};
 
  • Like
Les réactions: Maxence
Dans ton config_button.cpp (de Radial Menu), dans la class interationCfg il faut ajouter le menu avec les boutons (à modifier) :
Code:
class animations_menu {
    class button_1 {
        displayName = "Bouton 1";
        buttonAction = "hint 'Bouton 1';";
        buttonToolTip = "";
        side[] = {civ,west,guer};
        disable = false;
        condition = "";
    };

    class button_2 {
        displayName = "Bouton 2";
        buttonAction = "hint 'Bouton 2';";
        buttonToolTip = "";
        side[] = {civ,west,guer};
        disable = false;
        condition = "";
    };
};

Puis dans ton fn_actionKeyHandler.sqf remplace ces lignes :
Code:
if ((typeOf _curObject) isEqualTo "Land_Money_F" && {!(_curObject getVariable ["inUse",false])}) then {
    [_curObject,player,true] remoteExecCall ["TON_fnc_pickupAction",RSERV];
};
par :
Code:
if ((typeOf _curObject) isEqualTo "Land_Money_F" && {!(_curObject getVariable ["inUse",false])}) then {
    [_curObject,player,true] remoteExecCall ["TON_fnc_pickupAction",RSERV];
} else {
    ["animations_menu"] spawn CBX_fnc_openInteraction;
};
 
Solution