Français [License Plate] Modifier les plaques des véhicules D3S - Nouvelle Version

Loic Shmit

Forum Manager
Membre du personnel
  • Badge qui certifie que The Programmer a vérifié ce compte.
  • Badge attribué aux créateurs de tutoriaux !
  • Quand vous avez atteint 20 messages !
25/8/18
53
31
300
Badges
4
the-programmer.com
vdgrg-ConvertImage.png


Bonjour, dans ce tutoriel, je vais vous montrer comment faire fonctionner les voitures du D3S avec le produit The-Programmer License Plates

C'est parti !

Dans votre @The_Programmer/addons/license_plates/client/fn_vehicleBuyImmatriculation.sqf ajouter à la fin du fichier :
Code:
[_vehicle] call d3s_fnc_setLicense;
Dans votre @The_Programmer/addons/license_plates/server/fn_initVehicleImmatriculation.sqf ajouter à la fin du fichier :
Code:
[_vehicle] call d3s_fnc_setLicense;
Dans votre @The_Programmer/addons/license_plates/server/fn_updatePlate.sqf ajouter à la fin du fichier :
Code:
[_vehicle] call d3s_fnc_setLicense;
Remplacer le fichier @modpack/addons/d3s_cars_core/functions/vehicle/fn_setlicense.sqf par :
Code:
/*
    Author : Maxence
*/
_vehicle = param [0,objNull,[objNull]];
if !(local _vehicle) exitWith {false};

_license = _vehicle getVariable ["vehicle_info_plate",""];

if !(_license in ["","0"]) then {
    _licenseArr = _license splitString "";

    {
        _licenseChar = _x;
        _licenseChar = toLower _licenseChar;

        if !(_licenseChar in ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]) then {
            _licenseArr deleteAt _forEachIndex;
        };
    } forEach _licenseArr;

    _licenseArr resize 7;

    {
        _licenseChar = _licenseArr select _forEachIndex;
        if (isNil {_licenseChar}) then {_licenseChar = "";};
        _licenseChar = toLower _licenseChar;

        if (_licenseChar in ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]) then {
            _vehicle setObjectTextureGlobal [_x,format ["d3s_cars_core\license\%1.paa",_licenseChar]];
        } else {
            _vehicle setObjectTextureGlobal [_x, ""];
        };
    } forEach [20,21,22,23,24,25,26];
} else {
    {
        _vehicle setObjectTextureGlobal [_x, ""];
    } forEach [20,21,22,23,24,25,26];
};

true;
Remplacer le fichier @modpack/addons/d3s_f10_12/functions/vehicle/fn_setlicense.sqf par :
Code:
/*
    Author : Maxence
*/
_vehicle = param [0,objNull,[objNull]];
if !(local _vehicle) exitWith {false};

_license = _vehicle getVariable ["vehicle_info_plate",""];

if !(_license in ["","0"]) then {
    _licenseArr = _license splitString "";

    {
        _licenseChar = _x;
        _licenseChar = toLower _licenseChar;

        if !(_licenseChar in ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]) then {
            _licenseArr deleteAt _forEachIndex;
        };
    } forEach _licenseArr;

    _licenseArr resize 7;

    {
        _licenseChar = _licenseArr select _forEachIndex;
        if (isNil {_licenseChar}) then {_licenseChar = "";};
        _licenseChar = toLower _licenseChar;

        if (_licenseChar in ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]) then {
            _vehicle setObjectTextureGlobal [_x,format ["d3s_cars_core\license\%1.paa",_licenseChar]];
        } else {
            _vehicle setObjectTextureGlobal [_x, ""];
        };
    } forEach [20,21,22,23,24,25,26];
} else {
    {
        _vehicle setObjectTextureGlobal [_x, ""];
    } forEach [20,21,22,23,24,25,26];
};

true;
Et voila !

Cordialement,
Forum Manager Loic Shmit
 
  • Like
Les réactions: Antoine et IceEagle132