stock loadCar(playerid)
{
GetPlayerName(playerid, pAutoInfo[playerid][sName], MAX_PLAYER_NAME);
pAutoInfo[playerid][pKey] = mysql_GetInt("cars", "Key", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][pAUTOPoS_X] = mysql_GetFloat("cars", "AutoX", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][pAUTOPoS_Y] = mysql_GetFloat("cars", "AutoY", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][pAUTOPoS_Z] = mysql_GetFloat("cars", "AutoZ", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][pAUTOPoS_A] = mysql_GetFloat("cars", "AutoA", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][ModelID] = mysql_GetInt("cars", "ModelID", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][Farbe1] = mysql_GetInt("cars", "Farbe1", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][Farbe2] = mysql_GetInt("cars", "Farbe2", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][Preis] = mysql_GetInt("cars", "VKPreis", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][reppreis] = mysql_GetInt("cars", "ReparaturPreis", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][spaintjobid] = mysql_GetInt("cars", "PaintJob", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modspoiler] = mysql_GetInt("cars", "Spoiler", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modnitro] = mysql_GetInt("cars", "Nitro", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modwheels] = mysql_GetInt("cars", "Wheels", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modlights] = mysql_GetInt("cars", "Lights", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modhood] = mysql_GetInt("cars", "MotorHaube", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modexhaust] = mysql_GetInt("cars", "Auspuff", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modhydrau] = mysql_GetInt("cars", "Hydraulic", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modroof] = mysql_GetInt("cars", "AutoDach", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modstereo] = mysql_GetInt("cars", "Stereo", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modfrontbumper] = mysql_GetInt("cars","Frontstossstange", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modrearfumper] = mysql_GetInt("cars","Heckstossstange", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modventsl] = mysql_GetInt("cars","VentsLinks", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modventsr] = mysql_GetInt("cars","VentsRechts", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modsideskirtr] = mysql_GetInt("cars","SchwellerleistenRechts", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modsideskirtl] = mysql_GetInt("cars","SchwellerleistenLinks", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modbullbar] = mysql_GetInt("cars","BullBar", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modrearbullbars] = mysql_GetInt("cars","rearbullbars", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modfrontbullbars] = mysql_GetInt("cars","frontbullbars", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][modbullbars] = mysql_GetInt("cars","Stossstangen", "Name", pAutoInfo[playerid][sName]);
pAutoInfo[playerid][Carid] = CreateVehicle(pAutoInfo[playerid][ModelID],pAutoInfo[playerid][pAUTOPoS_X],pAutoInfo[playerid][pAUTOPoS_Y],pAutoInfo[playerid][pAUTOPoS_Z],pAutoInfo[playerid][pAUTOPoS_A],pAutoInfo[playerid][Farbe1],pAutoInfo[playerid][Farbe2],-1);
ChangeVehiclePaintjob(pAutoInfo[playerid][Carid],pAutoInfo[playerid][spaintjobid]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modspoiler]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modnitro]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modwheels]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modlights]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modhood]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modexhaust]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modhydrau]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modroof]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modstereo]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modfrontbumper]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modrearfumper]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modventsl]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modventsr]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modsideskirtr]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modsideskirtl]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modbullbar]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modrearbullbars]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modfrontbullbars]);
AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modbullbars]);
return 1;
}
stock SaveAuto(playerid)
{
GetPlayerName(playerid, pAutoInfo[playerid][sName], MAX_PLAYER_NAME);
mysql_SetInt("cars", "Key",pAutoInfo[playerid][pKey], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","VKPreis",pAutoInfo[playerid][Preis], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars", "ReparaturPreis",pAutoInfo[playerid][reppreis], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","ModelID",pAutoInfo[playerid][ModelID], "Name",pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Farbe1",pAutoInfo[playerid][Farbe1], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Farbe2",pAutoInfo[playerid][Farbe2], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Spoiler",pAutoInfo[playerid][modspoiler], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Nitro",pAutoInfo[playerid][modnitro], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Wheels",pAutoInfo[playerid][modwheels], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Lights",pAutoInfo[playerid][modlights], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","MotorHaube",pAutoInfo[playerid][modhood], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Auspuff",pAutoInfo[playerid][modexhaust], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Hydraulic",pAutoInfo[playerid][modhydrau], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","AutoDach",pAutoInfo[playerid][modroof], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Stereo",pAutoInfo[playerid][modstereo], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Frontstossstange",pAutoInfo[playerid][modfrontbumper], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Heckstossstange",pAutoInfo[playerid][modrearfumper], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","VentsLinks",pAutoInfo[playerid][modventsl], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","VentsRechts",pAutoInfo[playerid][modventsr], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","SchwellerleistenRechts",pAutoInfo[playerid][modsideskirtr], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","SchwellerleistenLinks",pAutoInfo[playerid][modsideskirtl], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","BullBar",pAutoInfo[playerid][modbullbar], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","rearbullbars",pAutoInfo[playerid][modrearbullbars], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","frontbullbars",pAutoInfo[playerid][modfrontbullbars], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","Stossstangen",pAutoInfo[playerid][modbullbars], "Name", pAutoInfo[playerid][sName]);
mysql_SetInt("cars","PaintJob",pAutoInfo[playerid][spaintjobid], "Name",pAutoInfo[playerid][sName]);
mysql_SetFloat("cars", "AutoX",pAutoInfo[playerid][pAUTOPoS_X], "Name", pAutoInfo[playerid][sName]);
mysql_SetFloat("cars", "AutoY",pAutoInfo[playerid][pAUTOPoS_Y], "Name", pAutoInfo[playerid][sName]);
mysql_SetFloat("cars", "AutoZ",pAutoInfo[playerid][pAUTOPoS_Z], "Name", pAutoInfo[playerid][sName]);
mysql_SetFloat("cars", "AutoA",pAutoInfo[playerid][pAUTOPoS_A], "Name", pAutoInfo[playerid][sName]);
return 1;
}