Hay wie kann ich bei Ordnungsamt das Kennzeichen so machen:
Also bei jeden anders:
new kennzeichen[12];
format(kennzeichen, sizeof(kennzeichen), "LV-%d", randomEx(1000, 9999));
SetVehicleNumberPlate(oAmtVehs[v], kennzeichen);
SetVehicleToRespawn(oAmtVehs[v]);
public LoadFactionCars(){
if(!fexist(FACTION_CAR_FILE)){
new File:tfFile=fopen(FACTION_CAR_FILE,io_write);
fclose(tfFile);
}
new File:fFile=fopen(FACTION_CAR_FILE,io_read),Content[1024],fc;
while(fread(fFile,Content) && fc<sizeof(FactionCars)){
sscanf(Content,"dffffdddddddddddddddddddddd",
FactionCars[fc][fVehid],
FactionCars[fc][fPos][0],
FactionCars[fc][fPos][1],
FactionCars[fc][fPos][2],
FactionCars[fc][fPos][3],
FactionCars[fc][fCol][0],
FactionCars[fc][fCol][1],
FactionCars[fc][fFaction][0],
FactionCars[fc][fFaction][1],
FactionCars[fc][fFaction][2],
FactionCars[fc][fFaction][3],
FactionCars[fc][fFaction][4],
FactionCars[fc][fTuning][0],
FactionCars[fc][fTuning][1],
FactionCars[fc][fTuning][2],
FactionCars[fc][fTuning][3],
FactionCars[fc][fTuning][4],
FactionCars[fc][fTuning][5],
FactionCars[fc][fTuning][6],
FactionCars[fc][fTuning][7],
FactionCars[fc][fTuning][8],
FactionCars[fc][fTuning][9],
FactionCars[fc][fTuning][10],
FactionCars[fc][fTuning][11],
FactionCars[fc][fTuning][12],
FactionCars[fc][fTuning][13],
FactionCars[fc][fPrice]);
if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255);
switch(FactionCars[fc][fFaction][0])
{
case 1: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LSPD");
case 2: SetVehicleNumberPlate(FactionCars[fc][fCarid], "FBI");
case 3: SetVehicleNumberPlate(FactionCars[fc][fCarid], "ARMY");
case 4: SetVehicleNumberPlate(FactionCars[fc][fCarid], "ARZT");
case 5: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LCM");
case 6: SetVehicleNumberPlate(FactionCars[fc][fCarid], "YAKUZA");
case 7: SetVehicleNumberPlate(FactionCars[fc][fCarid], "PRÄSIDENT");
case 8: SetVehicleNumberPlate(FactionCars[fc][fCarid], "HITMAN");
case 9: SetVehicleNumberPlate(FactionCars[fc][fCarid], "SAN NEWS");
case 10: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TAXI");
case 11: SetVehicleNumberPlate(FactionCars[fc][fCarid], "FAHRLEHRER");
case 12: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TRIADEN");
case 13: SetVehicleNumberPlate(FactionCars[fc][fCarid], "GROVE");
case 14: SetVehicleNumberPlate(FactionCars[fc][fCarid], "BALLAS");
case 15: SetVehicleNumberPlate(FactionCars[fc][fCarid], "BIKER CLUB");
case 16: SetVehicleNumberPlate(FactionCars[fc][fCarid], "VAGOS");
case 17: SetVehicleNumberPlate(FactionCars[fc][fCarid], "AZTECAS");
case 18: SetVehicleNumberPlate(FactionCars[fc][fCarid], "RIFA");
case 19: SetVehicleNumberPlate(FactionCars[fc][fCarid], "RS");
case 20: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TERROR");
case 21: SetVehicleNumberPlate(FactionCars[fc][fCarid], "WHEELMEN");
case 22: SetVehicleNumberPlate(FactionCars[fc][fCarid], "FEUERWEHR");
case 23: SetVehicleNumberPlate(FactionCars[fc][fCarid], "RUSSEN");
case 24: SetVehicleNumberPlate(FactionCars[fc][fCarid], "ORDNUNGSAMT");
}
SetVehicleToRespawn(FactionCars[fc][fCarid]);
printf("Fahrzeug %d (Idx: %d) steht: %f / %f / %f", FactionCars[fc][fCarid], fc, FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2]);
SetVehicleToRespawn(FactionCars[fc][fCarid]);
printf("%d gehört zu: %d", FactionCars[fc][fCarid], FactionCars[fc][fFaction][0]);
SetVehicleToRespawn(FactionCars[fc][fCarid]);
#if defined FACTION_CARS_LOCKABLE
fLockCar(FactionCars[fc][fCarid]);
FactionCars[fc][fLock] = true;
#endif
#if defined FACTION_CARS_TUNEABLE
if(IsAllowedFactionToTune(FactionCars[fc][fFaction][0])){
if(FactionCars[fc][fTuning][0] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][0]); }
if(FactionCars[fc][fTuning][1] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][1]); }
if(FactionCars[fc][fTuning][2] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][2]); }
if(FactionCars[fc][fTuning][3] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][3]); }
if(FactionCars[fc][fTuning][4] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][4]); }
if(FactionCars[fc][fTuning][5] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][5]); }
if(FactionCars[fc][fTuning][6] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][6]); }
if(FactionCars[fc][fTuning][7] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][7]); }
if(FactionCars[fc][fTuning][8] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][8]); }
if(FactionCars[fc][fTuning][9] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][9]); }
if(FactionCars[fc][fTuning][10] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][10]); }
if(FactionCars[fc][fTuning][11] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][11]); }
if(FactionCars[fc][fTuning][12] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][12]); }
if(FactionCars[fc][fTuning][13] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][13]); }
}
#endif
fc++;
}
}fclose(fFile);
return printf(" '%d' Fraktionsfahrzeuge wurden geladen & erstellt.",fc);
}