English [License Plates] Changing vehicle plates - Charlieco89's mods

  • Auteur de la discussion Auteur de la discussion Thomas
  • Date de début Date de début

Thomas

User
29/12/19
68
6
20
600
22
Alsace, France
Hello,

In this Topic I am going to retranscribe you the modification of the script "License Plates" to modify the License Plates of the Charlieco89's mods.
I would like to thank Maxence Maxence for taking the time to make this script following my request.

1- In the folder of your choice, in your mission, create a file fn_setCharlieCOPlate.sqf by adding the following code :

fn_setCharlieCOPlate.sqf:
Développer Réduire Copier
/*
    Author : Maxence
*/
_vehicle = param [0,objNull,[objNull]];
if (isNull _vehicle) exitWith {};

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

if !(_license in ["","0"]) then {
    if ((count _license) > 15) then {
        _license = (["STR_RENTAL_PLATE","Max_Settings_Immatriculation","Immatriculation_Localization"] call theprogrammer_core_fnc_localize);
    };

    _licenseArr = _license splitString "";

    {
        _licenseChar = _x;
        _licenseChar = toUpper _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 = toUpper _licenseChar;

        _vehicle setObjectTextureGlobal [_x,format ["Charlieco89_Base\Lettre\%1.paa",_licenseChar]];
    } forEach [12,13,14,15,16,17,18];
} else {
    {
        _vehicle setObjectTextureGlobal [_x, ""];
    } forEach [12,13,14,15,16,17,18];
};

Add the new function setCharlieCOPlate to your Functions.hpp.

2- In the following files @The_Programmer/addons/license_plates/client/
  • fn_vehicleBuyImmatriculation.sqf
  • fn_newPlate.sqf
  • fn_maskPlate.sqf
  • fn_customPlateConfirm.sqf
And in the files @The_Programmer/addons/license_plates/server/
  • fn_initVehicleImmatriculation.sqf
  • fn_updatePlate.sqf
Add at the end of each file :
Code:
Développer Réduire Copier
[_vehicle] call life_fnc_setCharlieCOPlate;

It's finish !
Hoping that this will have helped you :)
 
Dernière édition par un modérateur:
  • Like
Les réactions: IceEagle132
Activité
Pour l'instant, il n'y a personne ici