English Separate garages according to their position to store and remove vehicles in the same place.

Mathis

Admin
Membre du personnel
29/12/19
503
16
48
1 100
Welcome to this tutorial that will allow you separate garages according to their position. For example, vehicles stored in a specific garage can only be retrieved from this garage.
This tutorial is a follow to the request for help from L Lilbape.

Let's go !

On your mapping, you should have a line like this in the init of the object to store your vehicle in the garage:
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

Replace :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
By :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

This will result in :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

In the init of the garage for take out the vehicles, replace this line :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
By :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
You can replace "kavala" by the name of your garage, it must correspond to the name of the storeVehicle where you are (the name does not matter as long as it is the same).

In your core/actions/fn_storeVehicle.sqf, search this line :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
And replace by :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

Add at the end of your life_server/Functions/Systems/fn_vehicleStore.sqf :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

In your life_server/Functions/Systems/fn_getVehicles.sqf, replace :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
By these lines :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
WARNING, if the line you have in your file is not exactly the same, which is very likely, do not copy the line directly but add the changes to the one you have in your file.

In your database, run the following code :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

-----

If all your garages depend on a position, you will need to set a default garage for new purchased vehicles that are not stored in the garage before the server reboot, otherwise they will not be visible anywhere in the garages.

To do this, in your life_server/Functions/MySQL/fn_insertVehicle.sqf, replace this line :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
by this one :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
WARNING, if the line you have in your file is not exactly the same, which is very likely, do not copy the line directly but add the changes to the one you have in your file.

-----

Here we go !

Sincerely,
Forum Manager - Mathis
 
Dernière édition par un modérateur:
  • Like
Les réactions: IceEagle132
Activité
Pour l'instant, il n'y a personne ici