This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Francesco Paolocci edited this page Oct 19, 2017
·
9 revisions
In this wiki you can get all necessary information about this library and how to use it for your advantage.
Requirements
- Newtonsoft.JSON 10.0.2 (Already supplied by GT-MP)
- Micky5991/GT-MP-vehicleInfo
Steps
- Download the latest version of the VehicleInfoLoader.dll
- Paste the dll into the root GT-MP-serverfolder
- Add the assembly to your meta.xml
<assembly ref="VehicleInfoLoader.dll" />
- Get the appropiate version of Micky5991/GT-MP-vehicleInfo
- Unpack the full zip file in the subfolder vehicleinfo of your serverfolder.
- Add a reference to that VehicleInfo.dll in your Project --> Tutorial for VisualStudio
The easiest way to use this script is with an IDE, Visual Studio for example. But if you need the Namespaces, they are listed down here.
using VehicleInfoLoader;
using VehicleInfoLoader.Data;
There are some settings available to change the behaviour of this script.
The settings should be applied in the constructor of the mainclass, otherwise they aren't loaded properly
VehicleInfoLoader.Setup(string path, bool cache);
Setting | Type | Default value | Description |
---|---|---|---|
path | string | vehicleinfo/ |
Relative path of the .json files from the root of the server |
cache | bool | true |
Setting if after the first request of a VehicleManifest, the result should be saved into the cache or not. |
Tip: If you want to set the path of all .json-file-folder to your own resource, use this function:
VehicleInfoLoader.Setup(Path.Combine(API.getResourceFolder(), @"vehicleinfo\"));