I dont have any code I need to know how to save it all I have is this.
pawn Код:
enum vInfo
{
    vOwner[MAX_PLAYER_NAME],
    vType,
    vFaction,
    vDealershipID,
    vSalePrice,
    vRentPrice,
    vLcoked,
    vColour1,
    vColour2,
    Float:vSpawnX,
    Float:vSpawnY,
    Float:vSpawnZ,
    Float:vSpawnAngle
}
new VehicleInfo[MAX_SAVED_VEHICLES][vInfo];
new bool:IsValidCar[MAX_VEHICLES];//Was used in an attempt to save cars as valid cars but I couldnt work out an index of a gang car.
//saving
forward LoadVehicles_Main(vehicleid, name[],value[]);
public LoadVehicles_Main(vehicleid, name[], value[])
{
    INI_String("Owner", VehicleInfo[vehicleid][vOwner], MAX_PLAYER_NAME);
    INI_Int("Type", VehicleInfo[vehicleid][vType]);
    INI_Int("FactionID", VehicleInfo[vehicleid][vFaction]);
    INI_Int("Dealership", VehicleInfo[vehicleid][vDealershipID]);
    INI_Int("Price", VehicleInfo[vehicleid][vSalePrice]);
    INI_Int("RentPrice", VehicleInfo[vehicleid][vRentPrice]);
    INI_Int("Locked", VehicleInfo[vehicleid][vLcoked]);
    INI_Int("Colour1", VehicleInfo[vehicleid][vColour1]);
    INI_Int("Colour2", VehicleInfo[vehicleid][vColour2]);
    VehicleCount++;
    return 1;
}
forward SaveVehicle(vehicleid);
public SaveVehicle(vehicleid)
{
    new INI:File = INI_Open(CarPath(vehicleid));
    INI_SetTag(File, "Main");
    INI_WriteString(File, "Owner", VehicleInfo[vehicleid][vOwner]);
    INI_WriteInt(File, "Type", VehicleInfo[vehicleid][vType]);
    INI_WriteInt(File, "FactionID", VehicleInfo[vehicleid][vFaction]);
    INI_WriteInt(File, "Dealership", VehicleInfo[vehicleid][vDealershipID]);
    INI_WriteInt(File, "Price", VehicleInfo[vehicleid][vSalePrice]);
    INI_WriteInt(File, "RentPrice", VehicleInfo[vehicleid][vRentPrice]);
    INI_WriteInt(File, "Locked", VehicleInfo[vehicleid][vLcoked]);
    INI_WriteInt(File, "Colour1", VehicleInfo[vehicleid][vColour1]);
    INI_WriteInt(File, "Colour2", VehicleInfo[vehicleid][vColour2]);
    INI_Close(File);
}
stock CarPath(saveindex)
{
    new string[128];
    format(string,sizeof(string), CAR_PATH, saveindex);
    return string;
}
 
Thats all the code I have I cant save the cars by there numbers as some cars arent always sapwned and some cars dont need to be saved. I need a way of indexing a vehicle correctly without having to have all cas spawned and by not saving all the cars that car temp cars.