Hier:
public CreateTunedCar(playerid, CarKey1)
{
printf("ingarage=%i",Carlist[playerid][CarKey1][ingarage]);
if(IsPlayerConnected(playerid) && Carlist[playerid][CarKey1][Typ] != -1)
{
printf("ingarage=%i",Carlist[playerid][CarKey1][ingarage]);
if(Carlist[playerid][CarKey1][ingarage] == 1) return 1;
// new carid = CreateVehicle(Kaufliste[Carlist[playerid][CarKey1][Typ]][Modelid],Carlist[playerid][CarKey1][SpawnSaveX],Carlist[playerid][CarKey1][SpawnSaveY],Carlist[playerid][CarKey1][SpawnSaveZ],Carlist[playerid][CarKey1][SpawnSaveRot],-1,-1,-1);
new carid = CreateVehicle(Kaufliste[Carlist[playerid][CarKey1][Typ]][Modelid],Carlist[playerid][CarKey1][pos_x],Carlist[playerid][CarKey1][pos_y],Carlist[playerid][CarKey1][pos_z],Carlist[playerid][CarKey1][z_angle],-1,-1,-1);
new string[50];
format(string, sizeof(string), "{FFFF00}E-RP-{21DD00}%d", carid);
SetVehicleNumberPlate(carid,string);
Gas[carid] = Carlist[playerid][CarKey1][TankVolumen];
Locked[carid] = Carlist[playerid][CarKey1][Lock];
if(Carlist[playerid][CarKey1][Lock] == 1){
ForAllPlayers(i){
SetVehicleParamsForPlayer(carid,i,0,1);
}
}
if(Carlist[playerid][CarKey1][mod1]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod1]); }
if(Carlist[playerid][CarKey1][mod2]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod2]); }
if(Carlist[playerid][CarKey1][mod3]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod3]); }
if(Carlist[playerid][CarKey1][mod4]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod4]); }
if(Carlist[playerid][CarKey1][mod5]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod5]); }
if(Carlist[playerid][CarKey1][mod6]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod6]); }
if(Carlist[playerid][CarKey1][mod7]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod7]); }
if(Carlist[playerid][CarKey1][mod8]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod8]); }
if(Carlist[playerid][CarKey1][mod9]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod9]); }
if(Carlist[playerid][CarKey1][mod10]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod10]); }
if(Carlist[playerid][CarKey1][mod11]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod11]); }
if(Carlist[playerid][CarKey1][mod12]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod12]); }
if(Carlist[playerid][CarKey1][mod13]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod13]); }
if(Carlist[playerid][CarKey1][mod14]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod14]); }
if(Carlist[playerid][CarKey1][mod15]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod15]); }
if(Carlist[playerid][CarKey1][mod16]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod16]); }
if(Carlist[playerid][CarKey1][mod17]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod17]); }
if(Carlist[playerid][CarKey1][Paintjob]!=-1) { ChangeVehiclePaintjob(carid,Carlist[playerid][CarKey1][Paintjob]); }
if(Carlist[playerid][CarKey1][Farbe1]!=-1) { ChangeVehicleColor(carid,Carlist[playerid][CarKey1][Farbe1],Carlist[playerid][CarKey1][Farbe2]); }
for(new i; i<MaxVeh[playerid]; i++){
if(Carlist[playerid][i][Neon]!=0){
switch(Carlist[playerid][i][NeonType]){
case 0:AttachObjectToVehicle(CreateObject(18647,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18647,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
case 1:AttachObjectToVehicle(CreateObject(18648,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18648,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
case 2:AttachObjectToVehicle(CreateObject(18649,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18649,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
case 3:AttachObjectToVehicle(CreateObject(18650,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18650,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
case 4:AttachObjectToVehicle(CreateObject(18651,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18651,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
case 5:AttachObjectToVehicle(CreateObject(18652,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18652,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
}
}
return carid;
}
return -1;
}