20.05.2017, 09:03
If you're creating vehicles into files, you need to grab the file ID and the in game ID in the file. That's how I do it at least and it works fine for saving, loading items like that. Example:
And an example of what I've done:
PHP код:
#define MAX_DYNAMIC_VEHICLES 1000
enum DynamicVehicles
{
vehicleID, // File ID.
vehicleIG // Ingame ID.
};
new FacVehicleData[MAX_DYNAMIC_VEHICLES][DynamicVehicles];
PHP код:
new vehicle = GetPlayerVehicleID(playerid), carid = IsFactionVehicle(vehicle);
if(carid != -1 && FacVehicleData[carid][vehicleFaction] > 0 && FacVehicleData[carid][vehicleCopGuns] && PlayerData[playerid][pFaction] == FacVehicleData[carid][vehicleFaction])
{
ShowPlayerDialog(playerid, DIALOG_USE, DIALOG_STYLE_LIST, title, string, "Ok", "");
}