Guten Tag,
ich habe ein Problem, die Nummernschilder für die Frakcars zu definieren.
Ich kriege immer den Error: : error 006: must be assigned to an array
Code:
//Fraktionskennzeichen
#define noobplate "Newbies"
#define bloodsplate "Bloods"
#define cripsplate "Vagos"
#define taxiplate "Intercity"
#define fbiplate "FBI"
#define medicplate "Klinik"
#define fsplate "Fahrschule"
#define newsplate "News AG"
#define pdplate "SAPD"
#define oamtplate "Ordungsamt"
#define armyplate "LS Bundeswehr"
#define regplate "Regierung"
#define yakuzaplate "Yakuza"
#define gsplate "Grove Street"
#define ballasplate "Ballas"
#define lcnplate "LCN"
#define aztenplate "Aztecas"
#define hitmanplate "Hitman"
#define terrorplate "XXXXX"
public CFCar(playerid,modelid,fraktion)
{
new Float: ax, Float: ay, Float: az,Float: aa, color,numberplate,sform[200];
GetPlayerPos(playerid,ax,ay,az);
GetPlayerFacingAngle(playerid,aa);
switch(GetPVarInt(playerid,"Leader"))
{
case 5:{color = sasvcarcolor;}
case 6:{color = sfkcarcolor;}
case 7:{color = lcncarcolor;}
case 8:{color = tcarcolor;}
case 9:{color = bloodscarcolor;}
case 10:{color = cripscarcolor;}
case 13:{color = kgjcarcolor;}
case 14:{color = slcarcolor;}
case 16:{color = bacarcolor;}
case 17:{color = gscarcolor;}
}
switch(GetPVarInt(playerid,"Leader"))
{
case 1:{numberplate = pdplate;}//von hier bis
case 2:{numberplate = fbiplate;}
case 3:{numberplate = oamtplate;}
case 4:{numberplate = medicplate;}
case 5:{numberplate = regplate;}
case 6:{numberplate = aztenplate;}
case 7:{numberplate = lcnplate;}
case 8:{numberplate = yakuzaplate;}
case 9:{numberplate = bloodsplate;}
case 10:{numberplate = cripsplate;}
case 11:{numberplate = newsplate;}
case 12:{numberplate = fsplate;}
case 13:{numberplate = hitmanplate;}
case 14:{numberplate = armyplate;}
case 15:{numberplate = terrorplate;}
case 16:{numberplate = ballasplate;}
case 17:{numberplate = gsplate;}//hier ist der Error
}
for(new x = 1;x<MAX_FCARS;x++)
{
format(sform,sizeof sform,"fautos/fauto_%d.txt",x);
if(!fexist(sform))
{
dini_Create(sform);
dini_IntSet(sform,"model",modelid);
dini_FloatSet(sform,"X",ax);
dini_FloatSet(sform,"Y",ay);
dini_FloatSet(sform,"Z",az);
dini_FloatSet(sform,"A",aa);
dini_IntSet(sform,"farbe1",color);
dini_IntSet(sform,"farbe2",color);
dini_IntSet(sform,"fraktion",fraktion);
dini_IntSet(sform,"Nummernschild",numberplate);
FraktionsCar[x][fcModel] = modelid;
FraktionsCar[x][fcX] = (ax);
FraktionsCar[x][fcY] = (ay);
FraktionsCar[x][fcZ] = (az);
FraktionsCar[x][fcA] = (aa);
FraktionsCar[x][fcFarbe1] = color;
FraktionsCar[x][fcFarbe2] = color;
FraktionsCar[x][fcID] = AddStaticVehicleEx(FraktionsCar[x][fcModel],FraktionsCar[x][fcX],FraktionsCar[x][fcY],FraktionsCar[x][fcZ],FraktionsCar[x][fcA],FraktionsCar[x][fcFarbe1],FraktionsCar[x][fcFarbe2],1200000);
FraktionsCar[x][fcFraktion] = fraktion;
FraktionsCar[x][fcNumberplate] = numberplate;
SendClientMessage(playerid,COLOR_GREEN,"Sie haben einen Firmenwagen erstellt!");
return 1;
}
}
return 1;
}
Ich möchte machen, dass beim Auto erstellen, automatisch das Fraktionkennzeichen geladen wird und am FCar ist.
MFG
TechnoLover