Français Solved Problème avec ACE et les scripts

Bonjour,

il n’y a aucune raison qu’ACE empêche des des actions. Peux tu m’envoyer Ici ton fn_setupActions s’il te plait
 
Bonjour,

il n’y a aucune raison qu’ACE empêche des des actions. Peux tu m’envoyer Ici ton fn_setupActions s’il te plait
Bien sûr, le voici :
[CODE title="fn_SetupActions.sqf"]/*
File: fn_setupActions.sqf
Author:

Description:
Master addAction file handler for all client-based actions.
*/

life_actions = [];

switch (playerSide) do {

//Civilian
case civilian: {
//Drop fishing net
life_actions pushBack (player addAction[localize "STR_pAct_DropFishingNet",life_fnc_dropFishingNet,"",0,false,false,"",'
(surfaceisWater (getPos vehicle player)) && (vehicle player isKindOf "Ship") && life_carryWeight < life_maxWeight && speed (vehicle player) < 2 && speed (vehicle player) > -1 && !life_net_dropped ']);

//Rob person
life_actions pushBack (player addAction[localize "STR_pAct_RobPerson",life_fnc_robAction,"",0,false,false,"",'
!isNull cursorObject && player distance cursorObject < 3.5 && isPlayer cursorObject && animationState cursorObject == "Incapacitated" && !(cursorObject getVariable ["robbed",false]) ']);

life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"""",'player distance cursorObject < 3 && ({([str cursorObject,"bench"] call KRON_StrInStr || [str cursorObject,"chair"] call KRON_StrInStr)} || ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
};

//Cops
case west:
{
//CopEnter - Driver Seat
life_actions = life_actions + [player addAction[localize "STR_pAct_DriverSeat",life_fnc_copEnter,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
//CopEnter - Passenger Seat
life_actions = life_actions + [player addAction[localize "STR_pAct_PassengerSeat",life_fnc_copEnter,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
//CopEnter - Gunner Seat
life_actions = life_actions + [player addAction[localize "STR_pAct_GunnerSeat",life_fnc_copEnter,"gunner",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
//CopEnter - Exit
life_actions = life_actions + [player addAction[localize "STR_pAct_GoOut",life_fnc_copEnter,"exit",100,false,false,"",'(vehicle player != player) && (locked(vehicle player)==2)']];

life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"""",'player distance cursorObject < 3 && ({([str cursorObject,"bench"] call KRON_StrInStr || [str cursorObject,"chair"] call KRON_StrInStr)} || ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
};

//EMS
case independent: {
life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"""",'player distance cursorObject < 3 && ({([str cursorObject,"bench"] call KRON_StrInStr || [str cursorObject,"chair"] call KRON_StrInStr)} || ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
};
};[/CODE]
 
J'ai également un problème (en rapport avec celui-là) c'est que je ne peux pas ouvrir les portes des commissariats d'Australia alors que sur l'éditeur je peux (en faisant la commande : player setVariable ['copLevel',1]
Je précise que j'ai Duty System si ça peut avoir un lien
 
Bien sûr, le voici :
[CODE title="fn_SetupActions.sqf"]/*
File: fn_setupActions.sqf
Author:

Description:
Master addAction file handler for all client-based actions.
*/

life_actions = [];

switch (playerSide) do {

//Civilian
case civilian: {
//Drop fishing net
life_actions pushBack (player addAction[localize "STR_pAct_DropFishingNet",life_fnc_dropFishingNet,"",0,false,false,"",'
(surfaceisWater (getPos vehicle player)) && (vehicle player isKindOf "Ship") && life_carryWeight < life_maxWeight && speed (vehicle player) < 2 && speed (vehicle player) > -1 && !life_net_dropped ']);

//Rob person
life_actions pushBack (player addAction[localize "STR_pAct_RobPerson",life_fnc_robAction,"",0,false,false,"",'
!isNull cursorObject && player distance cursorObject < 3.5 && isPlayer cursorObject && animationState cursorObject == "Incapacitated" && !(cursorObject getVariable ["robbed",false]) ']);

life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"""",'player distance cursorObject < 3 && ({([str cursorObject,"bench"] call KRON_StrInStr || [str cursorObject,"chair"] call KRON_StrInStr)} || ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
};

//Cops
case west:
{
//CopEnter - Driver Seat
life_actions = life_actions + [player addAction[localize "STR_pAct_DriverSeat",life_fnc_copEnter,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
//CopEnter - Passenger Seat
life_actions = life_actions + [player addAction[localize "STR_pAct_PassengerSeat",life_fnc_copEnter,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
//CopEnter - Gunner Seat
life_actions = life_actions + [player addAction[localize "STR_pAct_GunnerSeat",life_fnc_copEnter,"gunner",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
//CopEnter - Exit
life_actions = life_actions + [player addAction[localize "STR_pAct_GoOut",life_fnc_copEnter,"exit",100,false,false,"",'(vehicle player != player) && (locked(vehicle player)==2)']];

life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"""",'player distance cursorObject < 3 && ({([str cursorObject,"bench"] call KRON_StrInStr || [str cursorObject,"chair"] call KRON_StrInStr)} || ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
};

//EMS
case independent: {
life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"""",'player distance cursorObject < 3 && ({([str cursorObject,"bench"] call KRON_StrInStr || [str cursorObject,"chair"] call KRON_StrInStr)} || ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
};
};[/CODE]
Je reviens vers toi, l'action a l'air bonne, tu as l'action sur ta molette quand tu veux entrer dans un véhicule fermé ? si oui envoi ton fn_copEnter s'il te plait
 
Je reviens vers toi, l'action a l'air bonne, tu as l'action sur ta molette quand tu veux entrer dans un véhicule fermé ? si oui envoi ton fn_copEnter s'il te plait
Non, je ne l'ai pas (mis à part celle de base évidemment).
Salut essaye avec cet solutions
Rendez-vous dans le ''fn_initCop.sqf" a la fin du code ajouter cette ligne:

player setVariable ['copLevel',1]
Si je met cette ligne, les "niveaux" de coplevel ne fonctionneront plus, si ?
 
Bonjour à tous !

Les portes de la prison ainsi que le script pour monter dans les véhicules est désormais fonctionnel, merci !
Néanmoins, j'ai toujours le problème avec le script pour les chaises :unsure: : aucune action est présente lorsque je suis devant une chaise (j'ai essayé le script de base et le script avec les classname).

Merci d'avance
 
Est-ce que la condition pour afficher l'addAction est respectée ?
Code:
({([str cursorObject,"bench"] call KRON_StrInStr || [str cursorObject,"chair"] call KRON_StrInStr)} || ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))
Tu peux la tester dans la debug console (ça doit donner true) et vérifier que la classname de cette "chaise" est bien dedans
 
Est-ce que la condition pour afficher l'addAction est respectée ?
Code:
({([str cursorObject,"bench"] call KRON_StrInStr || [str cursorObject,"chair"] call KRON_StrInStr)} || ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))
Tu peux la tester dans la debug console (ça doit donner true) et vérifier que la classname de cette "chaise" est bien dedans
Comment faire sachant que j'ai Infistar ?
 
C'est difficile de dire d'où vient le problème comme ça 😓
Sinon essaye avec ce fn_setupActions.sqf :
Code:
/*
    File: fn_setupActions.sqf
    Author:

    Description:
    Master addAction file handler for all client-based actions.
*/

life_actions = [];

switch (playerSide) do {

    //Civilian
    case civilian: {
        //Drop fishing net
        life_actions pushBack (player addAction[localize "STR_pAct_DropFishingNet",life_fnc_dropFishingNet,"",0,false,false,"",'
        (surfaceisWater (getPos vehicle player)) && (vehicle player isKindOf "Ship") && life_carryWeight < life_maxWeight && speed (vehicle player) < 2 && speed (vehicle player) > -1 && !life_net_dropped ']);

        //Rob person
        life_actions pushBack (player addAction[localize "STR_pAct_RobPerson",life_fnc_robAction,"",0,false,false,"",'
        !isNull cursorObject && player distance cursorObject < 3.5 && isPlayer cursorObject && animationState cursorObject == "Incapacitated" && !(cursorObject getVariable ["robbed",false]) ']);

        life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"",'(player distance cursorObject < 3 && ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
    };
    
    //Cops
    case west:
    {
        //CopEnter - Driver Seat
        life_actions = life_actions + [player addAction[localize "STR_pAct_DriverSeat",life_fnc_copEnter,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
        //CopEnter - Passenger Seat
        life_actions = life_actions + [player addAction[localize "STR_pAct_PassengerSeat",life_fnc_copEnter,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
        //CopEnter - Gunner Seat
        life_actions = life_actions + [player addAction[localize "STR_pAct_GunnerSeat",life_fnc_copEnter,"gunner",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
        //CopEnter - Exit
        life_actions = life_actions + [player addAction[localize "STR_pAct_GoOut",life_fnc_copEnter,"exit",100,false,false,"",'(vehicle player != player) && (locked(vehicle player)==2)']];

        life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"",'(player distance cursorObject < 3 && ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
    };
    
    //EMS
    case independent: {
        life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"",'(player distance cursorObject < 3 && ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
    };
};

La classname de la chaise c'est bien Land_CampingChair_V2_white_F ou tas_fauteuille_gen ?
 
C'est difficile de dire d'où vient le problème comme ça 😓
Sinon essaye avec ce fn_setupActions.sqf :
Code:
/*
    File: fn_setupActions.sqf
    Author:

    Description:
    Master addAction file handler for all client-based actions.
*/

life_actions = [];

switch (playerSide) do {

    //Civilian
    case civilian: {
        //Drop fishing net
        life_actions pushBack (player addAction[localize "STR_pAct_DropFishingNet",life_fnc_dropFishingNet,"",0,false,false,"",'
        (surfaceisWater (getPos vehicle player)) && (vehicle player isKindOf "Ship") && life_carryWeight < life_maxWeight && speed (vehicle player) < 2 && speed (vehicle player) > -1 && !life_net_dropped ']);

        //Rob person
        life_actions pushBack (player addAction[localize "STR_pAct_RobPerson",life_fnc_robAction,"",0,false,false,"",'
        !isNull cursorObject && player distance cursorObject < 3.5 && isPlayer cursorObject && animationState cursorObject == "Incapacitated" && !(cursorObject getVariable ["robbed",false]) ']);

        life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"",'(player distance cursorObject < 3 && ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
    };
   
    //Cops
    case west:
    {
        //CopEnter - Driver Seat
        life_actions = life_actions + [player addAction[localize "STR_pAct_DriverSeat",life_fnc_copEnter,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
        //CopEnter - Passenger Seat
        life_actions = life_actions + [player addAction[localize "STR_pAct_PassengerSeat",life_fnc_copEnter,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
        //CopEnter - Gunner Seat
        life_actions = life_actions + [player addAction[localize "STR_pAct_GunnerSeat",life_fnc_copEnter,"gunner",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 3.5']];
        //CopEnter - Exit
        life_actions = life_actions + [player addAction[localize "STR_pAct_GoOut",life_fnc_copEnter,"exit",100,false,false,"",'(vehicle player != player) && (locked(vehicle player)==2)']];

        life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"",'(player distance cursorObject < 3 && ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
    };
   
    //EMS
    case independent: {
        life_actions pushBack (player addAction["<t color='#0099FF'>S'asseoir</t>",{[cursorObject,player] execVM "script\Sitting\sitdown.sqf"},true,1,true,true,"",'(player distance cursorObject < 3 && ((typeOf cursorObject) in ["Land_CampingChair_V2_white_F","tas_fauteuille_gen"]))']);
    };
};

La classname de la chaise c'est bien Land_CampingChair_V2_white_F ou tas_fauteuille_gen ?
Ca fonctionne ! J'ai désormais le pouvoir de m'asseoir 😅. Malheureusement, je peux m’asseoir mais ça ne me met pas sur la chaise mais à côté...