Bonjour, dans ce tutoriel, je vais vous montrer comment faire fonctionner les voitures de D3S avec le produit License Plates
C'est parti !
Dans les fichiers suivants @The_Programmer/addons/license_plates/client/
- tp_vehicleBuyImmatriculation.sqf
- tp_newPlate.sqf
- tp_maskPlate.sqf
- tp_customPlateConfirm.sqf
- tp_initVehicleImmatriculation.sqf
- tp_updatePlate.sqf
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
Dernière édition par un modérateur: