Problem mit Faktionscars Tuning

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Guten Tag.


    Wen ich bei einem Fraltions car 1 Tuning teil drauf mache verschwindet es sofort


    Function OnVehicleMod(playerid,vehicleid,componentid)
    {
    FRAC_OnVehicleMod(playerid, vehicleid, componentid);
    for(new x = 0; x < MaxVeh; x++)
    {
    if (vehicleid == PlayerCar[playerid][x][CarId] && Dtc_PlayerHaveCar[playerid][x])
    {
    if((componentid >= 1008) && (componentid <= 1010)) {PlayerCar[playerid][x][CarNitro] = componentid;}
    if((componentid >= 1142) && (componentid <= 1145)) {PlayerCar[playerid][x][CarVents] = componentid;}
    if((componentid == 1013) || (componentid == 1024)) {PlayerCar[playerid][x][CarLamps] = componentid;}
    if((componentid >= 1004) && (componentid <= 1005)||(componentid >= 1011) && (componentid <= 1012)) {PlayerCar[playerid][x][CarHood] = componentid;}
    if(componentid == 1087) {PlayerCar[playerid][x][CarHyd] = componentid;}
    if(componentid == 1086) {PlayerCar[playerid][x][CarHyd] = componentid;}
    if(IsAWheel(componentid)) {PlayerCar[playerid][x][CarWheel] = componentid;}
    if(IsAExhaust(componentid)) {PlayerCar[playerid][x][CarAusp] = componentid;}
    if(IsASideL(componentid)) {PlayerCar[playerid][x][CarSideL] = componentid; PlayerCar[playerid][x][CarSideR] = SideR;}
    if(IsASideR(componentid)) {PlayerCar[playerid][x][CarSideR] = componentid; PlayerCar[playerid][x][CarSideL] = SideL;}
    if(IsAFB(componentid)) {PlayerCar[playerid][x][CarFB] = componentid;}
    if(IsARB(componentid)) {PlayerCar[playerid][x][CarRB] = componentid;}
    if(IsASpoiler(componentid)) {PlayerCar[playerid][x][CarSpoiler] = componentid;}
    if(IsARoof(componentid)) {PlayerCar[playerid][x][CarRoof] = componentid;}
    }
    }
    return 1;
    }


    }
    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], "SAPD");
    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], "LCN");
    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], "HACKER");
    case 13: SetVehicleNumberPlate(FactionCars[fc][fCarid], "Crips");
    case 14: SetVehicleNumberPlate(FactionCars[fc][fCarid], "GROVE");
    case 15: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS BIKER");
    case 16: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS VAGOS");
    case 17: SetVehicleNumberPlate(FactionCars[fc][fCarid], "AZTECAS");
    case 18: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LOCOS");
    case 19: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TEXANER");
    case 20: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TERROR");
    case 21: SetVehicleNumberPlate(FactionCars[fc][fCarid], "WHEELMEN");
    case 22: SetVehicleNumberPlate(FactionCars[fc][fCarid], "SWAT");
    case 23: SetVehicleNumberPlate(FactionCars[fc][fCarid], "RUSSEN");
    case 24: SetVehicleNumberPlate(FactionCars[fc][fCarid], "O-AMT");
    }
    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);
    }public SaveFactionCars(bool:destroy)
    {
    printf("SaveFactionCars aufgerufen.");
    if(fexist(FACTION_CAR_FILE)) fremove(FACTION_CAR_FILE);
    new File:fFile=fopen(FACTION_CAR_FILE,io_append),Content[1024];
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    printf("fc: %d | fVehid: %d", fc, FactionCars[fc][fVehid]);
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    for(new i=0; i<13; i++) FactionCars[fc][fTuning][i] = GetVehicleComponentInSlot(FactionCars[fc][fCarid], i);
    format(Content,sizeof(Content),"%d %.3f %.3f %.3f %.3f %03d %03d %02d %02d %02d %02d %02d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\r\n",
    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]);
    printf("Content: %s", Content);
    fwrite(fFile,Content);
    if(destroy == true)
    {
    if(DestroyVehicle(FactionCars[fc][fCarid]))
    FactionCars[fc][fCarid] = -255;
    }
    }
    }
    printf("Ende.");
    fclose(fFile);
    return true;
    }

    Einmal editiert, zuletzt von DerFamer ()

  • public DestroyAndCreateFactionCar(fc)
    {
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    DestroyVehicle(FactionCars[fc][fCarid]);
    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], "SAPD");
    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], "LCN");
    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], "HACKER");
    case 13: SetVehicleNumberPlate(FactionCars[fc][fCarid], "Crips");
    case 14: SetVehicleNumberPlate(FactionCars[fc][fCarid], "GROVE");
    case 15: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS BIKER");
    case 16: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS VAGOS");
    case 17: SetVehicleNumberPlate(FactionCars[fc][fCarid], "AZTECAS");
    case 18: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LOCOS");
    case 19: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TEXANER");
    case 20: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TERROR");
    case 21: SetVehicleNumberPlate(FactionCars[fc][fCarid], "WHEELMEN");
    case 22: SetVehicleNumberPlate(FactionCars[fc][fCarid], "SWAT");
    case 23: SetVehicleNumberPlate(FactionCars[fc][fCarid], "RUSSEN");
    case 24: SetVehicleNumberPlate(FactionCars[fc][fCarid], "O-AMT");
    }
    SetVehicleToRespawn(FactionCars[fc][fCarid]);
    #if defined FACTION_CARS_TUNEABLE
    if(IsAllowedFactionToTune(FactionCars[fc][fFaction][0]))
    {
    for(new i=0; i<13; i++)
    {
    if(FactionCars[fc][fTuning][i] != 0)
    {
    AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][i]);
    }
    }
    }
    #endif
    }
    return true;
    }
    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], "SAPD");
    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], "LCN");
    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], "HACKER");
    case 13: SetVehicleNumberPlate(FactionCars[fc][fCarid], "Crips");
    case 14: SetVehicleNumberPlate(FactionCars[fc][fCarid], "GROVE");
    case 15: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS BIKER");
    case 16: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS VAGOS");
    case 17: SetVehicleNumberPlate(FactionCars[fc][fCarid], "AZTECAS");
    case 18: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LOCOS");
    case 19: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TEXANER");
    case 20: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TERROR");
    case 21: SetVehicleNumberPlate(FactionCars[fc][fCarid], "WHEELMEN");
    case 22: SetVehicleNumberPlate(FactionCars[fc][fCarid], "SWAT");
    case 23: SetVehicleNumberPlate(FactionCars[fc][fCarid], "RUSSEN");
    case 24: SetVehicleNumberPlate(FactionCars[fc][fCarid], "O-AMT");
    }
    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);
    }public SaveFactionCars(bool:destroy)
    {
    printf("SaveFactionCars aufgerufen.");
    if(fexist(FACTION_CAR_FILE)) fremove(FACTION_CAR_FILE);
    new File:fFile=fopen(FACTION_CAR_FILE,io_append),Content[1024];
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    printf("fc: %d | fVehid: %d", fc, FactionCars[fc][fVehid]);
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    for(new i=0; i<13; i++) FactionCars[fc][fTuning][i] = GetVehicleComponentInSlot(FactionCars[fc][fCarid], i);
    format(Content,sizeof(Content),"%d %.3f %.3f %.3f %.3f %03d %03d %02d %02d %02d %02d %02d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\r\n",
    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]);
    printf("Content: %s", Content);
    fwrite(fFile,Content);
    if(destroy == true)
    {
    if(DestroyVehicle(FactionCars[fc][fCarid]))
    FactionCars[fc][fCarid] = -255;
    }
    }
    }
    printf("Ende.");
    fclose(fFile);
    return true;
    }
    public RespawnFactionBuylist(){
    for(new fbl;fbl<sizeof(FactionBuylist);fbl++)
    SetVehicleToRespawn(FactionBuylist[fbl][fbCarid]);
    return 1;
    }


    public RemoveComponent(vehicleid,componentid)
    return RemoveVehicleComponent(vehicleid,componentid);
    public ChangePaintjob(vehicleid,paintjobid)
    return ChangeVehiclePaintjob(vehicleid,paintjobid);
    public ChangeColor(vehicleid,color1,color2)
    return ChangeVehicleColor(vehicleid,color1,color2);


    //E:


    public RemoveComponent(vehicleid,componentid)
    return RemoveVehicleComponent(vehicleid,componentid);


    //E: Pwn Quelle gesetzt


    Hab das mal gelöscht gehabt und ist drann geblieben hab das Fahrzeug respawnt und war wider weg.

    2 Mal editiert, zuletzt von DerFamer ()

  • #if defined FACTION_CARS_TUNEABLE


    C:\Windows\Vss\First Person\German-Black-Reallife\German-Black-Reallife\gamemodes\German-Black-Reallife.pwn(69237) : error 026: no matching "#if..."
    C:\Windows\Vss\First Person\German-Black-Reallife\German-Black-Reallife\gamemodes\German-Black-Reallife.pwn(69239) : error 026: no matching "#if..."
    C:\Windows\Vss\First Person\German-Black-Reallife\German-Black-Reallife\gamemodes\German-Black-Reallife.pwn(69337) : error 026: no matching "#if..."
    C:\Windows\Vss\First Person\German-Black-Reallife\German-Black-Reallife\gamemodes\German-Black-Reallife.pwn(69502) : error 026: no matching "#if..."
    Wen ich das Entferne bekomme ich 4 Errors.


    //E:


    Kein wunder wen ich die #endif nicht lösche


    Errors Behoben


    Wen ich das ersetze mit
    #if defined FACTION_CARS_LOCKABLE
    if(strcmp(cmdtext,"/flock",true)==0){
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
    for(new fc;fc<sizeof(FactionCars);fc++){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
    if(GetPlayerVehicleID(playerid) == FactionCars[fc][fCarid]){
    for(new f;f<5;f++){
    if(GetPlayerAdminLevel(playerid) >= NEEDED_ADMINLEVEL || GetPlayerFaction(playerid) == FactionCars[fc][fFaction][f]){
    PlayerPlaySound(playerid,1145,0.0,0.0,0.0);
    if(FactionCars[fc][fLock] == true){
    FactionCars[fc][fLock] = false;
    fUnlockCar(FactionCars[fc][fCarid]);
    GameTextForPlayer(playerid,"~w~Fahrzeug~n~~g~Aufgeschlossen",5000,3);
    }
    else if(FactionCars[fc][fLock] == false){
    fLockCar(FactionCars[fc][fCarid]);
    FactionCars[fc][fLock] = true;
    GameTextForPlayer(playerid,"~w~Fahrzeug~n~~r~Abgeschlossen",5000,3);
    }break;
    }
    }return true;
    }
    }
    }SendClientMessage(playerid,FACTION_COL_GREY,"Du sitzt in keinem Fraktionsfahrzeug!");
    }else{
    if(GetPlayerState(playerid)==PLAYER_STATE_PASSENGER)
    SendClientMessage(playerid,FACTION_COL_GREY,"Du musst der Fahrer dieses Fahrzeuges sein.");
    else
    SendClientMessage(playerid,FACTION_COL_GREY,"Du muss in einem Fahrzeug sitzen.");
    }return true;
    }
    #endif


    Dem compilert er nicht mehr?


    if(strcmp(cmdtext,"/flock",true)==0)
    {
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    if(GetPlayerVehicleID(playerid) == FactionCars[fc][fCarid])
    {
    for(new f;f<5;f++)
    {
    if(GetPlayerAdmin(playerid) >= NEEDED_ADMINLEVEL || GetPlayerFaction(playerid) == FactionCars[fc][fFaction][f])
    {
    PlayerPlaySound(playerid,1145,0.0,0.0,0.0);
    if(FactionCars[fc][fLock] == true)
    {
    FactionCars[fc][fLock] = false;
    fUnlockCar(FactionCars[fc][fCarid]);
    GameTextForPlayer(playerid,"~w~Fahrzeug~n~~g~Aufgeschlossen",5000,3);
    }
    else if(FactionCars[fc][fLock] == false)
    {
    fLockCar(FactionCars[fc][fCarid]);
    FactionCars[fc][fLock] = true;
    GameTextForPlayer(playerid,"~w~Fahrzeug~n~~r~Abgeschlossen",5000,3);
    }
    break;
    }
    }
    return true;
    }
    }
    }
    SendClientMessage(playerid,FACTION_COL_GREY,"Du sitzt in keinem Fraktionsfahrzeug!");
    }
    else
    {
    if(GetPlayerState(playerid)==PLAYER_STATE_PASSENGER) SendClientMessage(playerid,FACTION_COL_GREY,"Du musst der Fahrer dieses Fahrzeuges sein.");
    else SendClientMessage(playerid,FACTION_COL_GREY,"Du muss in einem Fahrzeug sitzen.");
    }
    return true;
    }
    return 1;
    }

    2 Mal editiert, zuletzt von DerFamer ()

  • AddComponent


    Besitze ich nicht :/


    //E:


    enum fCar{
    fCarid,
    fVehid,
    Float:fPos[4],
    fCol[2],
    fFaction[5],
    fTuning[14],
    fPrice,
    #if defined FACTION_CARS_LOCKABLE
    bool:fLock
    #endif
    };


    Function OnVehicleDeath(vehicleid)
    {
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
    {
    if (vehicleid == PlayerCar[playerid][x][CarId])
    {
    DestroyVehicle(PlayerCar[playerid][x][CarId]);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(vehicleid == FactionCars[fc][fCarid])
    {
    DestroyAndCreateFactionCar(fc);
    break;
    }
    }
    return 1;
    }


    public DestroyAndCreateFactionCar(fc)
    {
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    DestroyVehicle(FactionCars[fc][fCarid]);
    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], "SAPD");
    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], "LCN");
    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], "HACKER");
    case 13: SetVehicleNumberPlate(FactionCars[fc][fCarid], "Crips");
    case 14: SetVehicleNumberPlate(FactionCars[fc][fCarid], "GROVE");
    case 15: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS BIKER");
    case 16: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS VAGOS");
    case 17: SetVehicleNumberPlate(FactionCars[fc][fCarid], "AZTECAS");
    case 18: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LOCOS");
    case 19: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TEXANER");
    case 20: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TERROR");
    case 21: SetVehicleNumberPlate(FactionCars[fc][fCarid], "WHEELMEN");
    case 22: SetVehicleNumberPlate(FactionCars[fc][fCarid], "SWAT");
    case 23: SetVehicleNumberPlate(FactionCars[fc][fCarid], "RUSSEN");
    case 24: SetVehicleNumberPlate(FactionCars[fc][fCarid], "O-AMT");
    }
    SetVehicleToRespawn(FactionCars[fc][fCarid]);
    if(IsAllowedFactionToTune(FactionCars[fc][fFaction][0]))
    {
    for(new i=0; i<13; i++)
    {
    if(FactionCars[fc][fTuning][i] != 0)
    {
    AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][i]);
    }
    }
    }
    }
    return true;
    }
    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], "SAPD");
    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], "LCN");
    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], "HACKER");
    case 13: SetVehicleNumberPlate(FactionCars[fc][fCarid], "Crips");
    case 14: SetVehicleNumberPlate(FactionCars[fc][fCarid], "GROVE");
    case 15: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS BIKER");
    case 16: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS VAGOS");
    case 17: SetVehicleNumberPlate(FactionCars[fc][fCarid], "AZTECAS");
    case 18: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LOCOS");
    case 19: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TEXANER");
    case 20: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TERROR");
    case 21: SetVehicleNumberPlate(FactionCars[fc][fCarid], "WHEELMEN");
    case 22: SetVehicleNumberPlate(FactionCars[fc][fCarid], "SWAT");
    case 23: SetVehicleNumberPlate(FactionCars[fc][fCarid], "RUSSEN");
    case 24: SetVehicleNumberPlate(FactionCars[fc][fCarid], "O-AMT");
    }
    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;
    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);
    }
    public SaveFactionCars(bool:destroy)
    {
    printf("SaveFactionCars aufgerufen.");
    if(fexist(FACTION_CAR_FILE)) fremove(FACTION_CAR_FILE);
    new File:fFile=fopen(FACTION_CAR_FILE,io_append),Content[1024];
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    printf("fc: %d | fVehid: %d", fc, FactionCars[fc][fVehid]);
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    for(new i=0; i<13; i++) FactionCars[fc][fTuning][i] = GetVehicleComponentInSlot(FactionCars[fc][fCarid], i);
    format(Content,sizeof(Content),"%d %.3f %.3f %.3f %.3f %03d %03d %02d %02d %02d %02d %02d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\r\n",
    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]);
    printf("Content: %s", Content);
    fwrite(fFile,Content);
    if(destroy == true)
    {
    if(DestroyVehicle(FactionCars[fc][fCarid]))
    FactionCars[fc][fCarid] = -255;
    }
    }
    }
    printf("Ende.");
    fclose(fFile);
    return true;
    }
    public RespawnFactionBuylist(){
    for(new fbl;fbl<sizeof(FactionBuylist);fbl++)
    SetVehicleToRespawn(FactionBuylist[fbl][fbCarid]);
    return 1;
    }
    public RemoveComponent(vehicleid,componentid)
    return RemoveVehicleComponent(vehicleid,componentid);
    public ChangePaintjob(vehicleid,paintjobid)
    return ChangeVehiclePaintjob(vehicleid,paintjobid);
    public ChangeColor(vehicleid,color1,color2)
    return ChangeVehicleColor(vehicleid,color1,color2);


    So Erstelle ich die Fahrzeuge:


    dcmd_efa(playerid,params[])
    {
    if(GetPlayerAdminLevel(playerid) >= NEEDED_ADMINLEVEL){
    new vehid,col1,col2,faction[5];
    if(!sscanf(params,"dddd",vehid,col1,col2,faction[0])){
    sscanf(params,"dddddddd",vehid,col1,col2,faction[0],faction[1],faction[2],faction[3],faction[4]);
    if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,FACTION_COL_GREY,"Vehicle-ID nur von 400 bis 611.");
    if(col1 < 0 || col1 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(1)!");
    if(col2 < 0 || col2 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(2)!");
    if(faction[0] && faction[0] <= MAX_FACTIONS){
    for(new f;f<5;f++){
    if(faction[f] <= 0 || faction[f] > MAX_FACTIONS){
    faction[f] = -255;
    }
    }
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(FactionCars[fc][fVehid] < 400 || FactionCars[fc][fVehid] > 611){
    FactionCars[fc][fVehid] = vehid;
    new Float:fX,Float:fY,Float:fZ,Float:fA;
    GetPlayerPos(playerid,fX,fY,fZ),GetPlayerFacingAngle(playerid,fA);
    FactionCars[fc][fPos][0] = fX;
    FactionCars[fc][fPos][1] = fY;
    FactionCars[fc][fPos][2] = fZ;
    FactionCars[fc][fPos][3] = fA;
    FactionCars[fc][fCol][0] = col1;
    FactionCars[fc][fCol][1] = col2;
    for(new f;f<5;f++){
    FactionCars[fc][fFaction][f] = faction[f];
    }
    FactionCars[fc][fPrice] = 0;
    for(new mood;mood<14;mood++)
    FactionCars[fc][fTuning][mood] = 0;
    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);
    #if defined FACTION_CARS_LOCKABLE
    FactionCars[fc][fLock] = true;
    #endif
    SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast das Fraktionsfahrzeug erfolgreich erstellt.");
    SendClientMessage(playerid,FACTION_COL_YELLOW,"Vergesse es nicht mit '/fpark' umzuparken.");
    PutPlayerInVehicle(playerid,FactionCars[fc][fCarid],0);
    return true;
    }
    }SendClientMessage(playerid,FACTION_COL_GREY,"Die Maximale Anzahl von Fraktionsfahrzeugen wurde bereits erreicht.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Fraktion!");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Benutze: '/efa [Model] [Farbe(1)] [Farbe(2)] [Hauptfraktion]'.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
    return true;
    }


    So Kann ich die Fahrzeuge respawnen:


    if(strcmp(cmdtext,"/rafa",true)==0){
    if(GetPlayerAdminLevel(playerid) >= NEEDED_ADMINLEVEL){
    new fName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,fName,sizeof(fName));
    format(string,sizeof(string),"Server: %s hat alle Fraktionsfahrzeuge respawnt.",fName);
    SendClientMessageToAll(FACTION_COL_YELLOW,string);
    for(new fc;fc<sizeof(FactionCars);fc++){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    DestroyAndCreateFactionCar(fc);
    }
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
    return true;
    }
    if(strcmp(cmdtext,"/ramfa",true)==0){
    if(GetPlayerLeader(playerid)){
    if(gettime() < LastRespawned[GetPlayerFaction(playerid)-1])
    return SendClientMessage(playerid,FACTION_COL_GREY,"Du kannst deine Fahrzeuge nur alle '5' Minuten respawnen.");
    LastRespawned[GetPlayerFaction(playerid)-1] = gettime()+(60*5);
    for(new fc;fc<sizeof(FactionCars);fc++){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
    if(FactionCars[fc][fFaction][0] == GetPlayerFaction(playerid)){
    DestroyAndCreateFactionCar(fc);
    }
    }
    }SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast deine Fraktionsfahrzeuge erfolgreich respawnt.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
    return true;
    }


    //E. Kann mir jemand per Teamviewer Helfen bitte

    Einmal editiert, zuletzt von DerFamer ()

  • #if defined FACTION_CARS_LOCKABLE


    Habe ich jetz bei allen Entfernt und bekomme 2 Warnings:


    C:\Windows\Vss\First Person\German-Black-Reallife\German-Black-Reallife\pawno\include\ForAllPlayers.inc(20) : warning 201: redefinition of constant/macro (symbol "OnPlayerConnect")
    C:\Windows\Vss\First Person\German-Black-Reallife\German-Black-Reallife\pawno\include\ForAllPlayers.inc(21) : warning 201: redefinition of constant/macro (symbol "OnPlayerDisconnect")



    Zeile: 20


    #include <ocmd>


    Zeile 21:
    #include <foreach>

  • Nimm das
    #include <ForAllPlayers>
    aus deinem Code raus.


    Dann füge unter den Includes das ein:
    #define ForAllPlayers(%0) for(new index_%0=0,%0=ConnectedPlayerList[0]; index_%0<ConnectedPlayers; index_%0++,%0=ConnectedPlayerList[index_%0])


    new ConnectedPlayers;
    new ConnectedPlayerList[MAX_PLAYERS+1];


    Das hier fügst du bei OnPlayerConnect ein:
    if(!IsPlayerNPC(playerid)) AddPlayer(playerid);


    Das bei OnPlayerDisconnect:
    if(!IsPlayerNPC(playerid)) RemovePlayer(playerid);


    Und das hier ganz unten im Gamemode:
    stock AddPlayer(playerid){
    if(ConnectedPlayers>=MAX_PLAYERS || playerid<0 || playerid>=MAX_PLAYERS) return 0;
    ConnectedPlayerList[ConnectedPlayers++]=playerid;
    return 1;
    }


    stock RemovePlayer(playerid){
    for(new i;i<ConnectedPlayers;i++){
    if(ConnectedPlayerList[i]==playerid){
    ConnectedPlayers--;
    ConnectedPlayerList[i]=ConnectedPlayerList[ConnectedPlayers];
    return 1;
    }
    }return 0;
    }

  • Nun habe ich 0 Warnings.


    Habe es Versucht nochmal wird nicht gespeichert...


    Nunja habe aber noch ein anderes Problem den Warning hab ich seit anfang an:


    C:\Windows\Vss\First Person\German-Black-Reallife\German-Black-Reallife\gamemodes\German-Black-Reallife.pwn(71576) : warning 203: symbol is never used: "M_OnPlayerCommandText"


    M_OnPlayerCommandText


    Gibt es im Script nicht..

  • #pragma unused M_OnPlayerCommandText
    In den Code einfügen.


    Jetzt die Frage:
    Wird es nicht gespeichert, oder wird es nicht geladen? Füge dem Fahrzeug mal Tunings hinzu und speichere es dann. Stehen die Daten in der Datei dann drin?

  • Dann schreibe das Laden so und poste dann was im Server Log steht:
    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]);
    printf("%d|Content: %s", fc, Content);
    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], "SAPD");
    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], "LCN");
    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], "HACKER");
    case 13: SetVehicleNumberPlate(FactionCars[fc][fCarid], "Crips");
    case 14: SetVehicleNumberPlate(FactionCars[fc][fCarid], "GROVE");
    case 15: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS BIKER");
    case 16: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LS VAGOS");
    case 17: SetVehicleNumberPlate(FactionCars[fc][fCarid], "AZTECAS");
    case 18: SetVehicleNumberPlate(FactionCars[fc][fCarid], "LOCOS");
    case 19: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TEXANER");
    case 20: SetVehicleNumberPlate(FactionCars[fc][fCarid], "TERROR");
    case 21: SetVehicleNumberPlate(FactionCars[fc][fCarid], "WHEELMEN");
    case 22: SetVehicleNumberPlate(FactionCars[fc][fCarid], "SWAT");
    case 23: SetVehicleNumberPlate(FactionCars[fc][fCarid], "RUSSEN");
    case 24: SetVehicleNumberPlate(FactionCars[fc][fCarid], "O-AMT");
    }
    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]);
    fLockCar(FactionCars[fc][fCarid]);
    FactionCars[fc][fLock] = true;
    printf("Allowed: %d", IsAllowedFactionToTune(FactionCars[fc][fFaction][0]));
    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]); }
    }
    fc++;
    }
    }
    fclose(fFile);
    return printf(" '%d' Fraktionsfahrzeuge wurden geladen & erstellt.",fc);
    }

  • [09:40:49] Fahrzeug 1 (Idx: 0) steht: 1041.031005 / -289.933013 / 73.694000
    [09:40:49] 1 gehört zu: 13
    [09:40:49] Allowed: 1
    [09:40:49] 1|Content: 560 1050.036 -290.820 73.694 177.912 079 079 13 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:49] Fahrzeug 2 (Idx: 1) steht: 1050.036010 / -290.820007 / 73.694000
    [09:40:49] 2 gehört zu: 13
    [09:40:49] Allowed: 1
    [09:40:49] 2|Content: 522 1066.514 -290.036 73.555 181.248 079 079 13 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500000



    [09:40:49] Fahrzeug 3 (Idx: 2) steht: 1066.514038 / -290.036010 / 73.555000
    [09:40:49] 3 gehört zu: 13
    [09:40:49] Allowed: 1
    [09:40:49] 3|Content: 439 1344.979 338.545 20.079 62.055 000 000 08 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 150000



    [09:40:49] Fahrzeug 4 (Idx: 3) steht: 1344.979003 / 338.545013 / 20.079000
    [09:40:49] 4 gehört zu: 8
    [09:40:49] Allowed: 1
    [09:40:49] 4|Content: 522 2515.729 -1678.280 13.567 51.041 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500000



    [09:40:49] Fahrzeug 5 (Idx: 4) steht: 2515.729003 / -1678.280029 / 13.567000
    [09:40:49] 5 gehört zu: 14
    [09:40:49] Allowed: 1
    [09:40:49] 5|Content: 487 2527.750 -1676.302 20.107 89.535 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000000



    [09:40:49] Fahrzeug 6 (Idx: 5) steht: 2527.750000 / -1676.302001 / 20.107000
    [09:40:49] 6 gehört zu: 14
    [09:40:49] Allowed: 1
    [09:40:49] 6|Content: 560 2468.833 -1669.546 13.095 13.005 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:49] Fahrzeug 7 (Idx: 6) steht: 2468.833007 / -1669.546020 / 13.095000
    [09:40:49] 7 gehört zu: 14
    [09:40:49] Allowed: 1
    [09:40:50] 7|Content: 522 2514.100 -1681.081 12.994 49.080 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500000



    [09:40:50] Fahrzeug 8 (Idx: 7) steht: 2514.100097 / -1681.081054 / 12.994000
    [09:40:50] 8 gehört zu: 14
    [09:40:50] Allowed: 1
    [09:40:50] 8|Content: 409 2473.177 -1697.228 13.317 1.003 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 750000



    [09:40:50] Fahrzeug 9 (Idx: 8) steht: 2473.177001 / -1697.228027 / 13.317000
    [09:40:50] 9 gehört zu: 14
    [09:40:50] Allowed: 1
    [09:40:50] 9|Content: 579 2509.583 -1672.067 13.338 352.015 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200000



    [09:40:50] Fahrzeug 10 (Idx: 9) steht: 2509.583007 / -1672.067016 / 13.338000
    [09:40:50] 10 gehört zu: 14
    [09:40:50] Allowed: 1
    [09:40:50] 10|Content: 587 2506.102 -1678.588 13.185 322.970 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 11 (Idx: 10) steht: 2506.102050 / -1678.588012 / 13.185000
    [09:40:50] 11 gehört zu: 14
    [09:40:50] Allowed: 1
    [09:40:50] 11|Content: 560 2476.958 -1653.696 13.100 89.152 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 12 (Idx: 11) steht: 2476.958007 / -1653.696044 / 13.100000
    [09:40:50] 12 gehört zu: 14
    [09:40:50] Allowed: 1
    [09:40:50] 12|Content: 554 2500.466 -1654.708 13.529 74.111 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100000



    [09:40:50] Fahrzeug 13 (Idx: 12) steht: 2500.466064 / -1654.708007 / 13.529000
    [09:40:50] 13 gehört zu: 14
    [09:40:50] Allowed: 1
    [09:40:50] 13|Content: 522 2514.995 -1680.968 13.001 45.152 086 086 14 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500000



    [09:40:50] Fahrzeug 14 (Idx: 13) steht: 2514.995117 / -1680.968017 / 13.001000
    [09:40:50] 14 gehört zu: 14
    [09:40:50] Allowed: 1
    [09:40:50] 14|Content: 522 1318.994 347.006 19.114 245.130 000 000 08 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500000



    [09:40:50] Fahrzeug 15 (Idx: 14) steht: 1318.994018 / 347.006011 / 19.114000
    [09:40:50] 15 gehört zu: 8
    [09:40:50] Allowed: 1
    [09:40:50] 15|Content: 522 1822.708 -1403.104 13.003 359.427 000 000 21 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500000



    [09:40:50] Fahrzeug 16 (Idx: 15) steht: 1822.708007 / -1403.104003 / 13.003000
    [09:40:50] 16 gehört zu: 21
    [09:40:50] Allowed: 1
    [09:40:50] 16|Content: 580 1043.218 -299.700 73.789 177.602 079 079 13 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100000



    [09:40:50] Fahrzeug 17 (Idx: 16) steht: 1043.218017 / -299.700012 / 73.789001
    [09:40:50] 17 gehört zu: 13
    [09:40:50] Allowed: 1
    [09:40:50] 17|Content: 522 673.768 -1303.665 13.208 252.492 013 013 05 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500000



    [09:40:50] Fahrzeug 18 (Idx: 17) steht: 673.768005 / -1303.665039 / 13.208000
    [09:40:50] 18 gehört zu: 5
    [09:40:50] Allowed: 1
    [09:40:50] 18|Content: 560 2602.843 1833.899 10.524 89.597 024 024 06 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 19 (Idx: 18) steht: 2602.843017 / 1833.899047 / 10.524000
    [09:40:50] 19 gehört zu: 6
    [09:40:50] Allowed: 1
    [09:40:50] 19|Content: 554 2602.843 1811.890 10.909 92.555 024 024 06 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100000



    [09:40:50] Fahrzeug 20 (Idx: 19) steht: 2602.843017 / 1811.890014 / 10.909000
    [09:40:50] 20 gehört zu: 6
    [09:40:50] Allowed: 1
    [09:40:50] 20|Content: 560 879.518 -1053.052 31.305 269.902 093 093 17 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 21 (Idx: 20) steht: 879.518005 / -1053.052001 / 31.305000
    [09:40:50] 21 gehört zu: 17
    [09:40:50] Allowed: 1
    [09:40:50] 21|Content: 560 879.518 -1049.963 31.305 269.993 093 093 17 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 22 (Idx: 21) steht: 879.518005 / -1049.963012 / 31.305000
    [09:40:50] 22 gehört zu: 17
    [09:40:50] Allowed: 1
    [09:40:50] 22|Content: 482 879.843 -1043.937 31.718 270.036 093 093 17 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200000



    [09:40:50] Fahrzeug 23 (Idx: 22) steht: 879.843017 / -1043.937011 / 31.718000
    [09:40:50] 23 gehört zu: 17
    [09:40:50] Allowed: 1
    [09:40:50] 23|Content: 560 1829.010 -1403.364 13.133 1.024 000 000 21 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 24 (Idx: 23) steht: 1829.010009 / -1403.364013 / 13.133000
    [09:40:50] 24 gehört zu: 21
    [09:40:50] Allowed: 1
    [09:40:50] 24|Content: 482 2899.593 -1996.921 11.303 2.515 004 004 15 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200000



    [09:40:50] Fahrzeug 25 (Idx: 24) steht: 2899.593017 / -1996.921020 / 11.303000
    [09:40:50] 25 gehört zu: 15
    [09:40:50] Allowed: 1
    [09:40:50] 25|Content: 554 2892.427 -1996.176 11.281 0.986 004 004 15 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100000



    [09:40:50] Fahrzeug 26 (Idx: 25) steht: 2892.427001 / -1996.176025 / 11.281000
    [09:40:50] 26 gehört zu: 15
    [09:40:50] Allowed: 1
    [09:40:50] 26|Content: 487 2879.520 -1957.348 17.600 90.875 004 004 15 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000000



    [09:40:50] Fahrzeug 27 (Idx: 26) steht: 2879.520019 / -1957.348022 / 17.600000
    [09:40:50] 27 gehört zu: 15
    [09:40:50] Allowed: 1
    [09:40:50] 27|Content: 560 1834.734 -1403.505 13.133 358.959 000 000 21 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 28 (Idx: 27) steht: 1834.734008 / -1403.505004 / 13.133000
    [09:40:50] 28 gehört zu: 21
    [09:40:50] Allowed: 1
    [09:40:50] 28|Content: 560 1825.645 -1403.192 13.133 0.150 000 000 21 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 29 (Idx: 28) steht: 1825.645019 / -1403.192016 / 13.133000
    [09:40:50] 29 gehört zu: 21
    [09:40:50] Allowed: 1
    [09:40:50] 29|Content: 560 1831.729 -1403.482 13.133 0.762 000 000 21 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 30 (Idx: 29) steht: 1831.729003 / -1403.482055 / 13.133000
    [09:40:50] 30 gehört zu: 21
    [09:40:50] Allowed: 1
    [09:40:50] 30|Content: 554 1077.354 -287.234 74.078 180.876 079 079 13 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100000



    [09:40:50] Fahrzeug 31 (Idx: 30) steht: 1077.354003 / -287.234008 / 74.078002
    [09:40:50] 31 gehört zu: 13
    [09:40:50] Allowed: 1
    [09:40:50] 31|Content: 560 1342.796 333.458 19.881 62.971 000 000 08 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250000



    [09:40:50] Fahrzeug 32 (Idx: 31) steht: 1342.796020 / 333.458007 / 19.881000
    [09:40:50] 32 gehört zu: 8
    [09:40:50] Allowed: 1
    [09:40:50] 32|Content: 522 1318.378 345.704 19.127 247.279 000 000 08 -255 -255 -255 -255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500000



    [09:40:50] Fahrzeug 33 (Idx: 32) steht: 1318.378051 / 345.704010 / 19.127000
    [09:40:50] 33 gehört zu: 8
    [09:40:50] Allowed: 1
    [09:40:50] '33' Fraktionsfahrzeuge wurden geladen & erstellt.

  • public SaveFactionCars(bool:destroy)
    {
    printf("SaveFactionCars aufgerufen.");
    if(fexist(FACTION_CAR_FILE)) fremove(FACTION_CAR_FILE);
    new File:fFile=fopen(FACTION_CAR_FILE,io_append),Content[1024];
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    printf("fc: %d | fVehid: %d", fc, FactionCars[fc][fVehid]);
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    for(new i=0; i<13; i++) FactionCars[fc][fTuning][i] = GetVehicleComponentInSlot(FactionCars[fc][fCarid], i);
    format(Content,sizeof(Content),"%d %.3f %.3f %.3f %.3f %03d %03d %02d %02d %02d %02d %02d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\r\n",
    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]);
    printf("Content: %s", Content);
    fwrite(fFile,Content);
    if(destroy == true)
    {
    if(DestroyVehicle(FactionCars[fc][fCarid]))
    FactionCars[fc][fCarid] = -255;
    }
    }
    }
    printf("Ende.");
    fclose(fFile);
    return true;
    }



    //HANDY

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen