Français Solved Comment entrer dans un véhicule sans ouvrir la porte en utilisant la souris?

21/1/20
40
3
300
Bonjour j'aimerais savoir si quelqu'un pourrais m'aider sur comment pouvoir rentrer dans les véhicules sans avoir besoins de les ouvrirs et de pouvoir rentrer dedans avec la mollette de la souris

Merci de votre aide que vous pourrez m'apporter ;)
 
Solution
Salut,

Pour les gendarmes il faut que tu ailles dans :
Code:
core\fn_setupActions.sqf


dans la case west tu mets ça :
Code:
        life_actions = life_actions + [player addAction["Monter en conducteur",life_fnc_copvehiunlock,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 5']];
        life_actions = life_actions + [player addAction["Monter en passager",life_fnc_copvehiunlock,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget...
Salut,

Pour les gendarmes il faut que tu ailles dans :
Code:
core\fn_setupActions.sqf


dans la case west tu mets ça :
Code:
        life_actions = life_actions + [player addAction["Monter en conducteur",life_fnc_copvehiunlock,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 5']];
        life_actions = life_actions + [player addAction["Monter en passager",life_fnc_copvehiunlock,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 5']];
        life_actions = life_actions + [player addAction["Descendre",life_fnc_copvehiunlock,"exit",100,false,false,"",'(vehicle player != player) && (locked(vehicle player)==2)']];


Ensuite tu vas créer un fichier dans :
Code:
core\cop

Tu le nomme fn_copvehiunlock.sqf et tu mets ce code dedans :
Code:
/*
        File: fn_copvehiunlock.sqf

        Description:
        Autoriser les gendarmes à rentrer dans un vehicule fermer
*/
if(playerSide != west) exitWith {};
private ["_position","_veh"];
_position = _this select 3;

switch (_position) do
{
        case "driver":
        {
                cursorTarget lock false;
                player action ["getInDriver", cursorTarget];
                cursorTarget lock true;
        };
        case "passenger":
        {
                cursorTarget lock false;
                player action ["getInCargo", cursorTarget];
                cursorTarget lock true;
        };
        case "exit":
        {
                _veh = vehicle player;
                _veh lock false;
                player action ["getOut", _veh];
                _veh lock true;
        };
};

Pour fini tu vas dans Functions.hpp à la racine de ta mission et dans la class cop tu rajoutes :
Code:
class copvehiunlock {};

Normalement ça devrais marcher ;)
 
Solution
Salut,

Pour les gendarmes il faut que tu ailles dans :
Code:
core\fn_setupActions.sqf


dans la case west tu mets ça :
Code:
        life_actions = life_actions + [player addAction["Monter en conducteur",life_fnc_copvehiunlock,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 5']];
        life_actions = life_actions + [player addAction["Monter en passager",life_fnc_copvehiunlock,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 5']];
        life_actions = life_actions + [player addAction["Descendre",life_fnc_copvehiunlock,"exit",100,false,false,"",'(vehicle player != player) && (locked(vehicle player)==2)']];


Ensuite tu vas créer un fichier dans :
Code:
core\cop

Tu le nomme fn_copvehiunlock.sqf et tu mets ce code dedans :
Code:
/*
        File: fn_copvehiunlock.sqf

        Description:
        Autoriser les gendarmes à rentrer dans un vehicule fermer
*/
if(playerSide != west) exitWith {};
private ["_position","_veh"];
_position = _this select 3;

switch (_position) do
{
        case "driver":
        {
                cursorTarget lock false;
                player action ["getInDriver", cursorTarget];
                cursorTarget lock true;
        };
        case "passenger":
        {
                cursorTarget lock false;
                player action ["getInCargo", cursorTarget];
                cursorTarget lock true;
        };
        case "exit":
        {
                _veh = vehicle player;
                _veh lock false;
                player action ["getOut", _veh];
                _veh lock true;
        };
};

Pour fini tu vas dans Functions.hpp à la racine de ta mission et dans la class cop tu rajoutes :
Code:
class copvehiunlock {};

Normalement ça devrais marcher ;)
Merci
 
  • Like
Les réactions: Florian Digate
Salut,

Pour les gendarmes il faut que tu ailles dans :
Code:
core\fn_setupActions.sqf


dans la case west tu mets ça :
Code:
        life_actions = life_actions + [player addAction["Monter en conducteur",life_fnc_copvehiunlock,"driver",200,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 5']];
        life_actions = life_actions + [player addAction["Monter en passager",life_fnc_copvehiunlock,"passenger",100,false,false,"",'!isNull cursorTarget && ((cursorTarget isKindOf "Car")||(cursorTarget isKindOf "Air")||(cursorTarget isKindOf "Ship")) && (locked cursorTarget) != 0 && cursorTarget distance player < 5']];
        life_actions = life_actions + [player addAction["Descendre",life_fnc_copvehiunlock,"exit",100,false,false,"",'(vehicle player != player) && (locked(vehicle player)==2)']];


Ensuite tu vas créer un fichier dans :
Code:
core\cop

Tu le nomme fn_copvehiunlock.sqf et tu mets ce code dedans :
Code:
/*
        File: fn_copvehiunlock.sqf

        Description:
        Autoriser les gendarmes à rentrer dans un vehicule fermer
*/
if(playerSide != west) exitWith {};
private ["_position","_veh"];
_position = _this select 3;

switch (_position) do
{
        case "driver":
        {
                cursorTarget lock false;
                player action ["getInDriver", cursorTarget];
                cursorTarget lock true;
        };
        case "passenger":
        {
                cursorTarget lock false;
                player action ["getInCargo", cursorTarget];
                cursorTarget lock true;
        };
        case "exit":
        {
                _veh = vehicle player;
                _veh lock false;
                player action ["getOut", _veh];
                _veh lock true;
        };
};

Pour fini tu vas dans Functions.hpp à la racine de ta mission et dans la class cop tu rajoutes :
Code:
class copvehiunlock {};

Normalement ça devrais marcher ;)
Nikel sa marche un grand merci à vous