PHP код:
void LoadMyCar(p)
{
new rows, fields;
cache_get_data(rows, fields);
if(!rows) return true;
new c,bufer[70];
for(new i; i < rows; i++)
{
CarInfo[p][i][cId] = cache_get_field_content_int(i, "id");
CarInfo[p][i][cModel] = cache_get_field_content_int(i, "cModel");
CarInfo[p][i][cX] = cache_get_field_content_float(i, "cX");
CarInfo[p][i][cY] = cache_get_field_content_float(i, "cY");
CarInfo[p][i][cZ] = cache_get_field_content_float(i, "cZ");
CarInfo[p][i][cFa] = cache_get_field_content_float(i, "cFa");
CarInfo[p][i][cFuel] = cache_get_field_content_int(i, "cFuel");
CarInfo[p][i][cProbeg] = cache_get_field_content_int(i, "cProbeg");
cache_get_field_content(i, "cNumber", CarInfo[p][i][cNumber], ConBD, 40);
CarInfo[p][i][cCarAr] = cache_get_field_content_int(i, "cCarAr");
CarInfo[p][i][cClass] = cache_get_field_content_int(i, "cClass");
CarInfo[p][i][cColor1] = cache_get_field_content_int(i, "cColor1");
CarInfo[p][i][cColor2] = cache_get_field_content_int(i, "cColor2");
CarInfo[p][i][cLock] = cache_get_field_content_int(i, "cLock");
CarInfo[p][i][cCost] = cache_get_field_content_int(i, "cCost");
CarInfo[p][i][cHealth] = cache_get_field_content_float(i, "cHealth");
cache_get_field_content(i, "cDamage", bufer, ConBD, 70);
cache_get_field_content(i, "cVehcom", CarInfo[p][i][cVehcom], ConBD, 64);
sscanf(CarInfo[p][i][cVehcom], "p<,>a<i>[14]",CarInfo[p][i][cVehcoms]);
CarInfo[p][i][cPaintjob] = cache_get_field_content_int(i, "cPaintjob");
CarInfo[p][i][cMoney] = cache_get_field_content_int(i, "cMoney");
CarInfo[p][i][cKan] = cache_get_field_content_int(i, "cKan");
CarInfo[p][i][cDeer] = cache_get_field_content_int(i, "cDeer");
//========================= номера авто ========================================
if(CarInfo[p][i][cX] == 0 && CarInfo[p][i][cY] == 0 && CarInfo[p][i][cZ] == 0)
{
new r = aShop();
c = CreateVehicle(CarInfo[p][i][cModel], SalonRandSpawn[r][0], SalonRandSpawn[r][1], SalonRandSpawn[r][2], SalonRandSpawn[r][3], CarInfo[p][i][cColor1], CarInfo[p][i][cColor2], 90000);
ShowPlayerDialog(p, D_NULL, 0, "# Автосалон | {FFD700}FAQ", "{FFFFFF}Вы не припарковали Ваш автомобиль перед выходом.\n\
{FFFFFF}Забрать Ваш автомобиль вы можете на штрафстоянке ГиБДД .\n\
{CD5C5C}Постарайтесь не забыть припарковать Ваш автомобиль в этот раз.", "Закрыть", "");
}
else c = CreateVehicle(CarInfo[p][i][cModel], CarInfo[p][i][cX], CarInfo[p][i][cY], CarInfo[p][i][cZ], CarInfo[p][i][cFa], CarInfo[p][i][cColor1], CarInfo[p][i][cColor2], 90000);
sscanf(bufer, "p<,>a<i>[4]", DamageS[c]);
CarInfo[p][i][cCarId] = c;
CarDoors(c, CarInfo[p][i][cLock]);
Fuel[c] = CarInfo[p][i][cFuel];
Probeg[c] = CarInfo[p][i][cProbeg];
SetVehicleHealth(c, CarInfo[p][i][cHealth]);
UpdateVehicleDamageStatus(c, DamageS[c][0],DamageS[c][1],DamageS[c][2],DamageS[c][3]);
Engine[c] = false;
Lights[c] = false;
SetVehicleNumberPlate(c,CarInfo[p][i][cNumber]);
switch(CarInfo[p][i][cLock])
{
case 0: IsLocked[c] = false;
case 1: IsLocked[c] = true;
}
NumberCode(p, i, false);
SetCarNumber(c, CarInfo[p][i][cNumber]);//3D номера
SetVehicleTuning(p, i);
}
return true;
}