English Include a repair kit when purchasing a vehicle

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

Mathis

The-Programmer
Membre du personnel
29/12/19
503
16
48
1 100
Welcome to this tutorial which will allow you to add a repair kit to the inventory of the vehicle when you purchase it ;)
This tutorial is a response to an help request from Loukas13 Loukas13.

Leeeet's goo !

In your core/shops/fn_vehicleShopBuy.sqf, add theses lines at the end :
Code:
_vehicleInfo = _vehicle getVariable ["Trunk",[[],0]];
_inv = _vehicleInfo select 0;

_inv pushBack ["toolkit",1];
_itemWeight = ["toolkit"] call life_fnc_itemWeight;

_vehicle setVariable ["Trunk",[_inv,((_vehicleInfo select 1) + _itemWeight)],true];

And, that's it !

Sincerely,
Forum Manager - Mathis