English [License plates] Display on D3S cars

I'm the Boss

Forum Manager
Membre du personnel
2/1/20
74
21
300
Badges
2
Hello, in this Tutorial I will show you how to make work D3S Cars with The-Programmer license plates...

First sorry for my english, if somebody find some mistakes in tutorial write me in the comment section.​

CREDITS
Author: Patrik "Patrik775702" Urmanič
With big big big help by: Maxence
END CREDITS

1. First we need unpack pbo.
  • Find (serverfolder)\ @The_Programmer\addons\license_plates.pbo.
  • Unpack license_plates.pbo with pbomanager (Or something else).

2. Now we need edit original license plates script.
  • Open (serverfolder)\ @The_Programmer\addons\license_plates\client\fn_newPlate.sqf. Find this line (line 94) :
Code:
_plate = format ['%1%2-%3%4%5-%6%7', toString [65 + random 25], toString [65 + random 25], round (random 9), round (random 9), round (random 9), toString [65 + random 25], toString [65 + random 25]];
  • Replace with this:
Code:
_plate = format ['%1%2-%3%4%5-%6%7', round (random 9), round (random 9), round (random 9), round (random 9), round (random 9), round (random 9), round (random 9)];
3. Open (serverfolder)\ @The_Programmer\addons\license_plates\client\fn_vehicleBuyImmatriculation.sqf. Find this line (line 25) :
Code:
_immatriculation = format ['%1%2-%3%4%5-%6%7', toString [65 + random 25], toString [65 + random 25], round (random 9), round (random 9), round (random 9), toString [65 + random 25], toString [65 + random 25]];
  • Replace with this:
Code:
_immatriculation = format ['%1%2-%3%4%5-%6%7', round (random 9), round (random 9), round (random 9), round (random 9), round (random 9), round (random 9),round (random 9)];
  • In the same file, find this line (line 29) :
Code:
[_vehicle] remoteExec ["max_immat_fnc_updatePlate",2];
  • And add underneath:
Code:
[_vehicle] call d3s_fnc_setLicense;
  • In the same file, find this line : (line 30) :
Code:
} else {
  • And add underneath:
Code:
[_vehicle] call d3s_fnc_setLicense;
4. Open (serverfolder)\ @The_Programmer\addons\license_plates\server\fn_initVehicleImmatriculation.sqf
  • Add this at the end
Code:
[_vehicle] call d3s_fnc_setLicense;
5. Open (serverfolder)\ @The_Programmer\addons\license_plates\server\fn_updatePlate.sqf. Find this line (line 34) :
Code:
_vehicle setPlateNumber _immatriculation;
  • And add underneath:
Code:
[_vehicle] call d3s_fnc_setLicense;
6. Pack folder (serverfolder)\ @The_Programmer\addons\license_plates to pbo.

What we change ??
In original script you have license plates something like this TK-584-KK now you will have only numbers 85-654-23.
Why?
I dont know why but letters was not showing on car. (If you know how to fix it write me in comment and I will try it.)

We dont finish yet !

7. You need go insade your modpack and find pbo file with name d3s_cars_core.
  • Open (yourmodpack)\ @d3s_cars_core\functions\vehicle\fn_setlicense.sqf
  • And replace everything with this:
Code:
/*
Edited by: Patrik "Patrik775702" Urmanič
With big help by: Maxence from The-Programmer
*/
private ["_vehicle"];

_vehicle = param [0,objNull,[objNull]];
if !(local _vehicle) exitWith {false};

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

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

    {
        if !(_x in ["0","1","2","3","4","5","6","7","8","9"]) then {
            _licenseArr deleteAt _forEachIndex;
        };
    } forEach _licenseArr;

    _licenseArr resize 7;

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

        if (_licenseChar in ["0","1","2","3","4","5","6","7","8","9"]) then {
            _vehicle setObjectTextureGlobal [_x,format ["d3s_cars_core\license\%1.paa",_licenseChar]];
        } else {
            _vehicle setObjectTextureGlobal [_x, ""];
        };
    } forEach [20,21,22,23,24,25,26];
};

true;
8. You need go insade your modpack and find pbo file with name d3s_f10_12.
  • Open (yourmodpack)\ @d3s_f10_12\functions\vehicle\fn_setlicense.sqf (if you have).
  • And replace everything with this:
Code:
/*
Edited by: Patrik "Patrik775702" Urmanič
With big help by: Maxence from The-Programmer
*/
private ["_vehicle"];

_vehicle = param [0,objNull,[objNull]];
if !(local _vehicle) exitWith {false};

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

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

    {
        if !(_x in ["0","1","2","3","4","5","6","7","8","9"]) then {
            _licenseArr deleteAt _forEachIndex;
        };
    } forEach _licenseArr;

    _licenseArr resize 7;

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

        if (_licenseChar in ["0","1","2","3","4","5","6","7","8","9"]) then {
            _vehicle setObjectTextureGlobal [_x,format ["d3s_amazing_f10_12\license\%1.paa",_licenseChar]];
        } else {
            _vehicle setObjectTextureGlobal [_x, ""];
        };
    } forEach [20,21,22,23,24,25,26];
};

true;

For best works you need remove or edit existing plates in your database from something like this HP-563-JL to random numbers 85-655-44.

Thats All if you find some mistakes or better way to make this works better write me in the comment section.
 
Dernière édition par un modérateur: