27.02.2014, 13:48
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?
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 ++;
}
}
}