Car system freezes pawno
#3

Still quite hard to understand though :P. Also it gives text mismatch for those floats @ loadvehicle.

Also, could you explain why loadvehicle_date has _data? and why are tags so important? Also, these are good right?

pawn Код:
stock SaveVehicle(vehicle, filename[36])
{
    INI:ini = INI_Open(filename);
    INI_WriteInt(ini, "Model", VehicleInfo[vehicle][vModel]);
    INI_WriteFloat(ini, "vX", VehicleInfo[vehicle][vX]);
    INI_WriteFloat(ini, "vY", VehicleInfo[vehicle][vY]);
    INI_WriteFloat(ini, "vZ", VehicleInfo[vehicle][vZ]);
    INI_WriteFloat(ini, "vX", VehicleInfo[vehicle][vX]);
    INI_WriteInt(ini, "Color1", VehicleInfo[vehicle][vColor1]);
    INI_WriteInt(ini, "Color2", VehicleInfo[vehicle][vColor2]);
    INI_WriteInt(ini, "Respawn", VehicleInfo[vehicle][vRespawn]);
    INI_WriteString(ini, "Owner", VehicleInfo[vehicle][vOwner]);
    INI_WriteInt(ini, "FactionCar", VehicleInfo[vehicle][vFaction]);
    INI_WriteInt(ini, "NoobCar", VehicleInfo[vehicle][vNoob]);
    INI_Close(ini);
}

stock SaveAllVehicles()
{
    new saveindex = 0;
    new fname[36];
    for(new i = 0; i < MAX_VEHICLES; i ++)
    {
        if(validcar[i])
        {
            format(fname, sizeof(fname), "/Vehicles/%d.ini", saveindex);
            SaveVehicle(i, fname);
            saveindex ++;
        }
    }
}
Reply


Messages In This Thread
Car system freezes pawno - by ThaCrypte - 26.02.2014, 22:55
Re: Car system freezes pawno - by Threshold - 26.02.2014, 23:18
Re: Car system freezes pawno - by ThaCrypte - 27.02.2014, 13:48
Re: Car system freezes pawno - by ThaCrypte - 27.02.2014, 21:32
Re: Car system freezes pawno - by Threshold - 27.02.2014, 22:22
Re: Car system freezes pawno - by ThaCrypte - 27.02.2014, 22:30

Forum Jump:


Users browsing this thread: 5 Guest(s)