EN | License plates and D3S Cars

Topic created · 5 Posts · 336 Views
  • 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

    MAKE BACKUP

    1. First we need unpack pbo.
    • Find (serverfolder)\ @The_Programmer\addons\license_plates.pbo.

    • Unpack license_plates.pbo with pbomanager (Or something else).

    1. Now we need edit original license plates script.
    • Open (serverfolder)\ @The_Programmer\addons\license_plates\client\fn_newPlate.sqf.

    • Search: (Line 68 base).

    _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:
    _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)];
    
    1. Open (serverfolder)\ @The_Programmer\addons\license_plates\client\fn_vehicleBuyImmatriculation.sqf.
    • Search: (Line 23 base).
    _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:
    _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)];
    
    • Search: (Line 30 base).
    [_vehicle] remoteExec ["max_immat_fnc_updatePlate",2];
    
    • And add underneath:
    [_vehicle] call d3s_fnc_setLicense;
    
    • Search: (Line 34 base).
    _vehicle setVariable ["vehicle_info_vid",-1,true];
    
    • And add underneath:
    [_vehicle] call d3s_fnc_setLicense;
    
    1. Open (serverfolder)\ @The_Programmer\addons\license_plates\server\fn_initVehicleImmatriculation.sqf
    • Add this at the end
    [_vehicle] call d3s_fnc_setLicense;
    
    1. Open (serverfolder)\ @The_Programmer\addons\license_plates\server\fn_updatePlate.sqf
    • Search: (Line 36 base).
    _vehicle setPlateNumber _immatriculationDisplay;
    
    • And add underneath:
    [_vehicle] call d3s_fnc_setLicense;
    
    1. 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 !

    1. 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:

    /*
    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",""];
     
    _licenseAlphaArray 		= ["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","-"];
    _licenseNumericArray 	= ["0","1","2","3","4","5","6","7","8","9"];
    _licenseSelections	 	= [20,21,22,23,24,25,26];
    
    if ((!(_license == "")) && (!(_license == "0"))) then {
        _licenseArr = _license splitString "";
        _licenseArr resize 7;
        {
            _licenseChar = _licenseArr select _forEachIndex;
            if (isNil {_licenseChar}) then { _licenseChar = ""; };
           
            if ((_licenseChar IN _licenseAlphaArray) OR (_licenseChar IN _licenseNumericArray)) then {
                _vehicle setObjectTextureGlobal [_x,format ["d3s_cars_core\license\%1.paa",_licenseChar]];
            } else {
                _vehicle setObjectTextureGlobal [_x, ""];
            };
        } forEach _licenseSelections;
    };
     
    true;
    
    1. You need go insade your modpack and find pbo file with name d3s_cars_core_18.
    • Open (yourmodpack)\ @d3s_cars_core_18\functions\vehicle\fn_setlicense.sqf (if you have).

    • And replace everything with this:

    /*
    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",""];
     
    _licenseAlphaArray 		= ["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","-"];
    _licenseNumericArray 	= ["0","1","2","3","4","5","6","7","8","9"];
    _licenseSelections	 	= [20,21,22,23,24,25,26];
    
    if ((!(_license == "")) && (!(_license == "0"))) then {
        _licenseArr = _license splitString "";
        _licenseArr resize 7;
        {
            _licenseChar = _licenseArr select _forEachIndex;
            if (isNil {_licenseChar}) then { _licenseChar = ""; };
           
            if ((_licenseChar IN _licenseAlphaArray) OR (_licenseChar IN _licenseNumericArray)) then {
                _vehicle setObjectTextureGlobal [_x,format ["d3s_cars_core_18\license\%1.paa",_licenseChar]];
            } else {
                _vehicle setObjectTextureGlobal [_x, ""];
            };
        } forEach _licenseSelections;
    };
     
    true;
    
    1. You need go insade your modpack and find pbo file with name d3s_amazing_f10_12.
    • Open (yourmodpack)\ @d3s_amazing_f10_12\functions\vehicle\fn_setlicense.sqf (if you have).

    • And replace everything with this:

    /*
    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",""];
     
    _licenseAlphaArray 		= ["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","-"];
    _licenseNumericArray 	= ["0","1","2","3","4","5","6","7","8","9"];
    _licenseSelections	 	= [20,21,22,23,24,25,26];
    
    if ((!(_license == "")) && (!(_license == "0"))) then {
        _licenseArr = _license splitString "";
        _licenseArr resize 7;
        {
            _licenseChar = _licenseArr select _forEachIndex;
            if (isNil {_licenseChar}) then { _licenseChar = ""; };
           
            if ((_licenseChar IN _licenseAlphaArray) OR (_licenseChar IN _licenseNumericArray)) then {
                _vehicle setObjectTextureGlobal [_x,format ["d3s_cars_core_18\license\%1.paa",_licenseChar]];
            } else {
                _vehicle setObjectTextureGlobal [_x, ""];
            };
        } forEach _licenseSelections;
    };
     
    true;
    
    1. 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:

    /*
    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",""];
     
    _licenseAlphaArray 		= ["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","-"];
    _licenseNumericArray 	= ["0","1","2","3","4","5","6","7","8","9"];
    _licenseSelections	 	= [20,21,22,23,24,25,26];
    
    if ((!(_license == "")) && (!(_license == "0"))) then {
        _licenseArr = _license splitString "";
        _licenseArr resize 7;
        {
            _licenseChar = _licenseArr select _forEachIndex;
            if (isNil {_licenseChar}) then { _licenseChar = ""; };
           
            if ((_licenseChar IN _licenseAlphaArray) OR (_licenseChar IN _licenseNumericArray)) then {
                _vehicle setObjectTextureGlobal [_x,format ["d3s_cars_core_18\license\%1.paa",_licenseChar]];
            } else {
                _vehicle setObjectTextureGlobal [_x, ""];
            };
        } forEach _licenseSelections;
    };
     
    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.

  • Hi man.
    Great work, but can you do this with a french license plates ? Something like this : RF - 608 - AC

  • @BastienWolf If french version is identical, you can use this tutorial. But you will have license plate only with number 65-555-34

  • @Patrik-Urmanič Since you know the modpack, do you know to make the lights brighter?

  • @IceEagle132 when I have time so I can look at it

Log in to reply