C
new SDatei[128];
format(SDatei,sizeof(SDatei),"/Autosystem/%s.cfg",getPlayerName(playerid));
if(dini_Exists(SDatei))
{
new string[128];
for(new i = 0; i < MAX_CARS; i++)
{
format(string,sizeof(string),"Car%i_Model",i);
carModel[playerid][i] = dini_Int(SDatei,string);
if(carModel[playerid][i] > 0)
{
format(string,sizeof(string),"Car%i_Abgeschleppt",i);
playerCarData[playerid][i][abgeschleppt] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_Spawn_X",i);
new Float:x = dini_Float(SDatei,string);
format(string,sizeof(string),"Car%i_Spawn_Y",i);
new Float:y = dini_Float(SDatei,string);
format(string,sizeof(string),"Car%i_Spawn_Z",i);
new Float:z = dini_Float(SDatei,string);
format(string,sizeof(string),"Car%i_Spawn_Rota",i);
new Float:rota = dini_Float(SDatei,string);
format(string,sizeof(string),"Car%i_Color_1",i);
new c1 = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_Color_2",i);
new c2 = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_SPOILER",i);
playerCarComp[playerid][i][0] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_HOOD",i);
playerCarComp[playerid][i][1] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_ROOF",i);
playerCarComp[playerid][i][2] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_LAMPS",i);
playerCarComp[playerid][i][3] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_NITRO",i);
playerCarComp[playerid][i][4] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_EXHAUST",i);
playerCarComp[playerid][i][5] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_SIDESKIRT",i);
playerCarComp[playerid][i][6] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_WHEELS",i);
playerCarComp[playerid][i][7] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_STEREO",i);
playerCarComp[playerid][i][8] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_HYDRAULICS",i);
playerCarComp[playerid][i][9] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_FRONT_BUMPER",i);
playerCarComp[playerid][i][10] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_REAR_BUMPER",i);
playerCarComp[playerid][i][11] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_VENT_RIGHT",i);
playerCarComp[playerid][i][12] = dini_Int(SDatei,string);
format(string,sizeof(string),"Car%i_CARMODTYPE_VENT_LEFT",i);
playerCarComp[playerid][i][13] = dini_Int(SDatei,string);
playerCar[playerid][i] = CreateVehicle(carModel[playerid][i],x,y,z,rota,c1,c2,-1);
playerCarData[playerid][i][parkenx] = x;
playerCarData[playerid][i][parkeny] = y;
playerCarData[playerid][i][parkenz] = z;
playerCarData[playerid][i][parkenrota] = rota;
for(new p = 0; p < 13; p++)
{
AddVehicleComponent(playerCar[playerid][i],playerCarComp[playerid][i][p]);
}
SetVehicleParamsEx(playerCar[playerid][i],0,0,0,1,0,0,0);
}
}
}
Alles anzeigen