Gangcar Tuning wird nicht angebracht

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
  • Ich bin nun soweit, dass die Speicherung und das Laden der Gangcars über MySQL ohne Probleme funktioniert, darunter fällt auch das Tuning. Einziger Haken ist, dass die Tuningteile, aus irgendeinem Grund nicht am Fahrzeug angebracht werden. HIer dazu mein Code vom Laden der Gangcars und dem Teil, wo die Komponenten angebracht werden sollten.


    public LoadGangAutos()
    {
    new string[128];
    mysql_free_result();
    for(new i = 0; i < sizeof(GangAutoInfo); i++)
    {
    format(string, sizeof(string),"SELECT * FROM `gangautos` WHERE `SlotID` = '%d'", i);
    mysql_query(string);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
    new val[ 512 ];
    mysql_fetch_field("CarID", val); GangAutoInfo[i][cID] = strval( val );
    mysql_fetch_field("OwnerID", val); GangAutoInfo[i][cOwner] = strval( val );
    mysql_fetch_field("TypID", val); GangAutoInfo[i][cTyp] = strval( val );
    mysql_fetch_field("PosX", val); GangAutoInfo[i][cPosX] = floatstr( val );
    mysql_fetch_field("PosY", val); GangAutoInfo[i][cPosY] = floatstr( val );
    mysql_fetch_field("PosZ", val); GangAutoInfo[i][cPosZ] = floatstr( val );
    mysql_fetch_field("Rotation", val); GangAutoInfo[i][cRot] = floatstr( val );
    mysql_fetch_field("Farbe1", val); GangAutoInfo[i][cColor1] = strval( val );
    mysql_fetch_field("Farbe2", val); GangAutoInfo[i][cColor2] = strval( val );
    mysql_fetch_field("Status", val); GangAutoInfo[i][cStatus] = strval( val );
    mysql_fetch_field("Tank", val); GangAutoInfo[i][cTank] = strval( val );
    mysql_fetch_field("ReSpawnTime", val); GangAutoInfo[i][cReSpawnTime] = strval( val );
    mysql_fetch_field("Tuning0", val); GangAutoInfo[i][cTuning][0] = strval ( val );
    mysql_fetch_field("Tuning1", val); GangAutoInfo[i][cTuning][1] = strval ( val );
    mysql_fetch_field("Tuning2", val); GangAutoInfo[i][cTuning][2] = strval ( val );
    mysql_fetch_field("Tuning3", val); GangAutoInfo[i][cTuning][3] = strval ( val );
    mysql_fetch_field("Tuning4", val); GangAutoInfo[i][cTuning][4] = strval ( val );
    mysql_fetch_field("Tuning5", val); GangAutoInfo[i][cTuning][5] = strval ( val );
    mysql_fetch_field("Tuning6", val); GangAutoInfo[i][cTuning][6] = strval ( val );
    mysql_fetch_field("Tuning7", val); GangAutoInfo[i][cTuning][7] = strval ( val );
    mysql_fetch_field("Tuning8", val); GangAutoInfo[i][cTuning][8] = strval ( val );
    mysql_fetch_field("Tuning9", val); GangAutoInfo[i][cTuning][9] = strval ( val );
    mysql_fetch_field("Tuning10", val); GangAutoInfo[i][cTuning][10] = strval ( val );
    mysql_fetch_field("Tuning11", val); GangAutoInfo[i][cTuning][11] = strval ( val );
    mysql_fetch_field("Tuning12", val); GangAutoInfo[i][cTuning][12] = strval ( val );
    mysql_fetch_field("Tuning13", val); GangAutoInfo[i][cTuning][13] = strval ( val );
    }
    else
    {
    GangAutoInfo[i][cID] = -1;
    GangAutoInfo[i][cOwner] = -1;
    GangAutoInfo[i][cTyp] = -1;
    GangAutoInfo[i][cPosX] = 0;
    GangAutoInfo[i][cPosY] = 0;
    GangAutoInfo[i][cPosZ] = 0;
    GangAutoInfo[i][cRot] = 0;
    GangAutoInfo[i][cColor1] = -1;
    GangAutoInfo[i][cColor2] = -1;
    GangAutoInfo[i][cStatus] = -1;
    GangAutoInfo[i][cTank] = 50;
    GangAutoInfo[i][cReSpawnTime] = 1800;
    GangAutoInfo[i][cStandTime] = 0;
    GangAutoInfo[i][cTuning][0] = 0;
    GangAutoInfo[i][cTuning][1] = 0;
    GangAutoInfo[i][cTuning][2] = 0;
    GangAutoInfo[i][cTuning][3] = 0;
    GangAutoInfo[i][cTuning][4] = 0;
    GangAutoInfo[i][cTuning][5] = 0;
    GangAutoInfo[i][cTuning][6] = 0;
    GangAutoInfo[i][cTuning][7] = 0;
    GangAutoInfo[i][cTuning][8] = 0;
    GangAutoInfo[i][cTuning][9] = 0;
    GangAutoInfo[i][cTuning][10] = 0;
    GangAutoInfo[i][cTuning][11] = 0;
    GangAutoInfo[i][cTuning][12] = 0;
    GangAutoInfo[i][cTuning][13] = 0;
    }
    mysql_free_result();
    }
    return 1;
    }


    forward GangCarTune();
    public GangCarTune()
    {
    for(new h = 0; h < sizeof(GangAutoInfo); h++)
    {
    if(GangAutoInfo[h][cTuning][0] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][0]); }
    if(GangAutoInfo[h][cTuning][1] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][1]); }
    if(GangAutoInfo[h][cTuning][2] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][2]); }
    if(GangAutoInfo[h][cTuning][3] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][3]); }
    if(GangAutoInfo[h][cTuning][4] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][4]); }
    if(GangAutoInfo[h][cTuning][5] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][5]); }
    if(GangAutoInfo[h][cTuning][6] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][6]); }
    if(GangAutoInfo[h][cTuning][7] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][7]); }
    if(GangAutoInfo[h][cTuning][8] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][8]); }
    if(GangAutoInfo[h][cTuning][9] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][9]); }
    if(GangAutoInfo[h][cTuning][10] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][10]); }
    if(GangAutoInfo[h][cTuning][11] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][11]); }
    if(GangAutoInfo[h][cTuning][12] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][12]); }
    if(GangAutoInfo[h][cTuning][13] != 0) { AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][13]); }
    printf("Gangcar Tune ausgeführt.");
    }
    return 1;
    }


    public CreateGangAutos()
    {
    for(new h = 0; h < sizeof(GangAutoInfo); h++){
    if(GangAutoInfo[h][cTyp] != -1){
    if(GangAutoInfo[h][cStatus] == 0){
    GangAutoInfo[h][cID] = CreateVehicle(GangAutoInfo[h][cTyp],GangAutoInfo[h][cPosX],GangAutoInfo[h][cPosY],GangAutoInfo[h][cPosZ],GangAutoInfo[h][cRot],GangAutoInfo[h][cColor1],GangAutoInfo[h][cColor2],GangAutoInfo[h][cReSpawnTime]);
    Gas[GangAutoInfo[h][cID]] = GangAutoInfo[h][cTank];
    SetTimer("GangCarTune", 3000, false);
    new string[255];
    format(string, sizeof(string), "{FFFF00}GLS-{21DD00}%d", GangAutoInfo[h][cID]);
    SetVehicleNumberPlate(GangAutoInfo[h][cID],string);
    }
    }
    }
    return 1;
    }



    Bitte um Hilfe, da ich langsam verzweifel :/


    Edit: @Jeffry: :love:


    Gruß
    Crowley :)

    Einmal editiert, zuletzt von varrez ()

  • Nimm hier bitte den Timer aus der Schleife raus, sonst wird der so oft gestartet, wie du Fahrzeuge erstellst.
    public CreateGangAutos()
    {
    new string[255];
    for(new h = 0; h < sizeof(GangAutoInfo); h++)
    {
    if(GangAutoInfo[h][cTyp] != -1)
    {
    if(GangAutoInfo[h][cStatus] == 0)
    {
    GangAutoInfo[h][cID] = CreateVehicle(GangAutoInfo[h][cTyp],GangAutoInfo[h][cPosX],GangAutoInfo[h][cPosY],GangAutoInfo[h][cPosZ],GangAutoInfo[h][cRot],GangAutoInfo[h][cColor1],GangAutoInfo[h][cColor2],GangAutoInfo[h][cReSpawnTime]);
    Gas[GangAutoInfo[h][cID]] = GangAutoInfo[h][cTank];
    format(string, sizeof(string), "{FFFF00}GLS-{21DD00}%d", GangAutoInfo[h][cID]);
    SetVehicleNumberPlate(GangAutoInfo[h][cID],string);
    }
    }
    }
    SetTimer("GangCarTune", 3000, false);
    return 1;
    }


    Dann kannst du das hier auch so abändern:
    forward GangCarTune();
    public GangCarTune()
    {
    printf("GangCarTune gestartet.");
    for(new h = 0; h < sizeof(GangAutoInfo); h++)
    {
    printf("Führe aus für h = %d", h);
    for(new i = 0; i <= 13; i++)
    {
    if(GangAutoInfo[h][cTuning][i] != 0)
    {
    printf("Füge hinzu: Slot %d Item %d zu Fahrzeug %d", h, GangAutoInfo[h][cTuning][i], GangAutoInfo[h][cID]);
    AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][i]);
    }
    }
    }
    printf("Gangcar Tune ausgeführt.");
    return 1;
    }


    Poste dann bitte mal was im Server Log steht.

    3HZXdYd.png

    Einmal editiert, zuletzt von Jeffry ()

  • Bevor ich das mache, ist es richtig bei GangCarTune mit AddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][0]); ?


    oder war alsAddVehicleComponent(GangAutoInfo[h][cID],GangAutoInfo[h][cTuning][i]); gedacht?


    Gruß

    Einmal editiert, zuletzt von varrez () aus folgendem Grund: Zitat entfernt

  • Stimmt, gut gesehen! Das habe ich vergessen abzuändern.Habe es im Post drüber ausgebessert. i stimmt dort natürlich.

  • Du hattest das mysql_free_result in der Schleife drin.
    Versuche es so:
    public LoadGangAutos()
    {
    new string[128];
    mysql_free_result();
    for(new i = 0; i < sizeof(GangAutoInfo); i++)
    {
    format(string, sizeof(string),"SELECT * FROM `gangautos` WHERE `SlotID` = '%d'", i);
    mysql_query(string);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
    new val[ 512 ];
    mysql_fetch_field("CarID", val); GangAutoInfo[i][cID] = strval( val );
    mysql_fetch_field("OwnerID", val); GangAutoInfo[i][cOwner] = strval( val );
    mysql_fetch_field("TypID", val); GangAutoInfo[i][cTyp] = strval( val );
    mysql_fetch_field("PosX", val); GangAutoInfo[i][cPosX] = floatstr( val );
    mysql_fetch_field("PosY", val); GangAutoInfo[i][cPosY] = floatstr( val );
    mysql_fetch_field("PosZ", val); GangAutoInfo[i][cPosZ] = floatstr( val );
    mysql_fetch_field("Rotation", val); GangAutoInfo[i][cRot] = floatstr( val );
    mysql_fetch_field("Farbe1", val); GangAutoInfo[i][cColor1] = strval( val );
    mysql_fetch_field("Farbe2", val); GangAutoInfo[i][cColor2] = strval( val );
    mysql_fetch_field("Status", val); GangAutoInfo[i][cStatus] = strval( val );
    mysql_fetch_field("Tank", val); GangAutoInfo[i][cTank] = strval( val );
    mysql_fetch_field("ReSpawnTime", val); GangAutoInfo[i][cReSpawnTime] = strval( val );
    mysql_fetch_field("Tuning0", val); GangAutoInfo[i][cTuning][0] = strval ( val );
    mysql_fetch_field("Tuning1", val); GangAutoInfo[i][cTuning][1] = strval ( val );
    mysql_fetch_field("Tuning2", val); GangAutoInfo[i][cTuning][2] = strval ( val );
    mysql_fetch_field("Tuning3", val); GangAutoInfo[i][cTuning][3] = strval ( val );
    mysql_fetch_field("Tuning4", val); GangAutoInfo[i][cTuning][4] = strval ( val );
    mysql_fetch_field("Tuning5", val); GangAutoInfo[i][cTuning][5] = strval ( val );
    mysql_fetch_field("Tuning6", val); GangAutoInfo[i][cTuning][6] = strval ( val );
    mysql_fetch_field("Tuning7", val); GangAutoInfo[i][cTuning][7] = strval ( val );
    mysql_fetch_field("Tuning8", val); GangAutoInfo[i][cTuning][8] = strval ( val );
    mysql_fetch_field("Tuning9", val); GangAutoInfo[i][cTuning][9] = strval ( val );
    mysql_fetch_field("Tuning10", val); GangAutoInfo[i][cTuning][10] = strval ( val );
    mysql_fetch_field("Tuning11", val); GangAutoInfo[i][cTuning][11] = strval ( val );
    mysql_fetch_field("Tuning12", val); GangAutoInfo[i][cTuning][12] = strval ( val );
    mysql_fetch_field("Tuning13", val); GangAutoInfo[i][cTuning][13] = strval ( val );
    }
    else
    {
    GangAutoInfo[i][cID] = -1;
    GangAutoInfo[i][cOwner] = -1;
    GangAutoInfo[i][cTyp] = -1;
    GangAutoInfo[i][cPosX] = 0;
    GangAutoInfo[i][cPosY] = 0;
    GangAutoInfo[i][cPosZ] = 0;
    GangAutoInfo[i][cRot] = 0;
    GangAutoInfo[i][cColor1] = -1;
    GangAutoInfo[i][cColor2] = -1;
    GangAutoInfo[i][cStatus] = -1;
    GangAutoInfo[i][cTank] = 50;
    GangAutoInfo[i][cReSpawnTime] = 1800;
    GangAutoInfo[i][cStandTime] = 0;
    GangAutoInfo[i][cTuning][0] = 0;
    GangAutoInfo[i][cTuning][1] = 0;
    GangAutoInfo[i][cTuning][2] = 0;
    GangAutoInfo[i][cTuning][3] = 0;
    GangAutoInfo[i][cTuning][4] = 0;
    GangAutoInfo[i][cTuning][5] = 0;
    GangAutoInfo[i][cTuning][6] = 0;
    GangAutoInfo[i][cTuning][7] = 0;
    GangAutoInfo[i][cTuning][8] = 0;
    GangAutoInfo[i][cTuning][9] = 0;
    GangAutoInfo[i][cTuning][10] = 0;
    GangAutoInfo[i][cTuning][11] = 0;
    GangAutoInfo[i][cTuning][12] = 0;
    GangAutoInfo[i][cTuning][13] = 0;
    }
    }
    mysql_free_result();
    return 1;
    }

  • Kannst du bitte darauf verzichten, den gesamten Post mit Code zu zitieren? Das macht keinen Sinn und sieht einfach nur abartig aus. Danke.


    Poste bitte, was der Server Log so ausgibt:
    public LoadGangAutos()
    {
    new string[128];
    mysql_free_result();
    for(new i = 0; i < sizeof(GangAutoInfo); i++)
    {
    format(string, sizeof(string),"SELECT * FROM `gangautos` WHERE `SlotID` = '%d'", i);
    mysql_query(string);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
    new val[ 512 ];
    mysql_fetch_field("CarID", val); GangAutoInfo[i][cID] = strval( val );
    mysql_fetch_field("OwnerID", val); GangAutoInfo[i][cOwner] = strval( val );
    mysql_fetch_field("TypID", val); GangAutoInfo[i][cTyp] = strval( val );
    mysql_fetch_field("PosX", val); GangAutoInfo[i][cPosX] = floatstr( val );
    mysql_fetch_field("PosY", val); GangAutoInfo[i][cPosY] = floatstr( val );
    mysql_fetch_field("PosZ", val); GangAutoInfo[i][cPosZ] = floatstr( val );
    mysql_fetch_field("Rotation", val); GangAutoInfo[i][cRot] = floatstr( val );
    mysql_fetch_field("Farbe1", val); GangAutoInfo[i][cColor1] = strval( val );
    mysql_fetch_field("Farbe2", val); GangAutoInfo[i][cColor2] = strval( val );
    mysql_fetch_field("Status", val); GangAutoInfo[i][cStatus] = strval( val );
    mysql_fetch_field("Tank", val); GangAutoInfo[i][cTank] = strval( val );
    mysql_fetch_field("ReSpawnTime", val); GangAutoInfo[i][cReSpawnTime] = strval( val );
    mysql_fetch_field("Tuning0", val); GangAutoInfo[i][cTuning][0] = strval ( val );
    mysql_fetch_field("Tuning1", val); GangAutoInfo[i][cTuning][1] = strval ( val );
    mysql_fetch_field("Tuning2", val); GangAutoInfo[i][cTuning][2] = strval ( val );
    mysql_fetch_field("Tuning3", val); GangAutoInfo[i][cTuning][3] = strval ( val );
    mysql_fetch_field("Tuning4", val); GangAutoInfo[i][cTuning][4] = strval ( val );
    mysql_fetch_field("Tuning5", val); GangAutoInfo[i][cTuning][5] = strval ( val );
    mysql_fetch_field("Tuning6", val); GangAutoInfo[i][cTuning][6] = strval ( val );
    mysql_fetch_field("Tuning7", val); GangAutoInfo[i][cTuning][7] = strval ( val );
    mysql_fetch_field("Tuning8", val); GangAutoInfo[i][cTuning][8] = strval ( val );
    mysql_fetch_field("Tuning9", val); GangAutoInfo[i][cTuning][9] = strval ( val );
    mysql_fetch_field("Tuning10", val); GangAutoInfo[i][cTuning][10] = strval ( val );
    mysql_fetch_field("Tuning11", val); GangAutoInfo[i][cTuning][11] = strval ( val );
    mysql_fetch_field("Tuning12", val); GangAutoInfo[i][cTuning][12] = strval ( val );
    mysql_fetch_field("Tuning13", val); GangAutoInfo[i][cTuning][13] = strval ( val );
    for(new j = 0; j <= 13; j++) printf("Fahrzeug %d: Tuning %d: %d", i, j, GangAutoInfo[i][cTuning][j]);
    }
    else
    {
    GangAutoInfo[i][cID] = -1;
    GangAutoInfo[i][cOwner] = -1;
    GangAutoInfo[i][cTyp] = -1;
    GangAutoInfo[i][cPosX] = 0;
    GangAutoInfo[i][cPosY] = 0;
    GangAutoInfo[i][cPosZ] = 0;
    GangAutoInfo[i][cRot] = 0;
    GangAutoInfo[i][cColor1] = -1;
    GangAutoInfo[i][cColor2] = -1;
    GangAutoInfo[i][cStatus] = -1;
    GangAutoInfo[i][cTank] = 50;
    GangAutoInfo[i][cReSpawnTime] = 1800;
    GangAutoInfo[i][cStandTime] = 0;
    GangAutoInfo[i][cTuning][0] = 0;
    GangAutoInfo[i][cTuning][1] = 0;
    GangAutoInfo[i][cTuning][2] = 0;
    GangAutoInfo[i][cTuning][3] = 0;
    GangAutoInfo[i][cTuning][4] = 0;
    GangAutoInfo[i][cTuning][5] = 0;
    GangAutoInfo[i][cTuning][6] = 0;
    GangAutoInfo[i][cTuning][7] = 0;
    GangAutoInfo[i][cTuning][8] = 0;
    GangAutoInfo[i][cTuning][9] = 0;
    GangAutoInfo[i][cTuning][10] = 0;
    GangAutoInfo[i][cTuning][11] = 0;
    GangAutoInfo[i][cTuning][12] = 0;
    GangAutoInfo[i][cTuning][13] = 0;
    }
    }
    mysql_free_result();
    return 1;
    }

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


  • public OnGameModeInit()
    {
    CreateDynamicObject(18750,221.14,1761.49, 42.12,90.00,0.00,20.33,1337);
    MySQLConnection = mysql_init();
    mysql_connect(MySQL_Host, MySQL_User, MySQL_Passwort, MySQL_DB, MySQLConnection);
    new string[MAX_PLAYER_NAME],
    string1[MAX_PLAYER_NAME],
    string2[256];
    LoadProperty();
    printf("OnGamemodeInt: LoadProperty");
    LoadBiz();
    printf("OnGamemodeInt: LoadBiz");
    LoadSBiz();
    printf("OnGamemodeInt: LoadSBiz");
    LoadTankenBiz();
    printf("OnGamemodeInt: LoadTankenBiz");
    LoadGangAutos();
    printf("OnGamemodeInt: LoadGangAutos");
    LoadGangBox();
    printf("OnGamemodeInt: LoadGangBox");
    LoadStuff();
    printf("OnGamemodeInt: LoadStuff");
    LoadKassenInfo();
    printf("OnGamemodeInt: LoadKassenInfo");
    LoadGangfightZones();
    printf("OnGamemodeInt: LoadGangfightZones");
    LoadGangWarInfos();
    printf("OnGamemodeInt: LoadGangWarInfos");
    LoadGangmotd();
    printf("OnGamemodeInt: LoadGangMotds");
    LoadGangBNDInfos();
    printf("OnGamemodeInt: LoadGangBNDInfos");
    CObjecte();
    printf("OnGamemodeInt: Stock CObjecte geladen");
    CDObjecte();
    printf("OnGamemodeInt: Stock CDObjecte geladen");
    OGMCars();
    printf("OnGamemodeInt: Stock OGMCars geladen");
    nodmzonen();
    printf("OnGamemodeInt: Gangzonen wurden erstellt");
    textdrawsogm();
    printf("OnGamemodeInt: Textdraws Geladen");
    AntiDeAMX();
    printf("AntiDeAMX aufgerufen");
    SetGameModeText("GTA:LS V1.0");
    SendRconCommand("mapname GTA:LS V1.0");
    printf("OnGamemodeInt: GameModeText & mapname");
    UpdateTime();
    printf("OnGamemodeInt: UpdateTime Geladen");
    CreateGangAutos();
    printf(">>>>> Create3DTexte Beginn <<<<<");
    Create3DTexte();
    printf(">>>>> Create3DTexte Fertig <<<<<");
    SObjecte();
    printf("OnGamemodeInt: SObjecte Geladen");
    OGMPickups();
    printf("OnGamemodeInt: OGMPickups Geladen");
    printf("OnGamemodeInt: Biginne rest zu laden");
    FunWorld();
    printf("OnGamemodeInt: FunWorld geladen");
    SetNameTagDrawDistance(30.0);
    EnableStuntBonusForAll(0);
    AllowInteriorWeapons(1);
    ShowPlayerMarkers(400);
    AllowAdminTeleport(1);
    DisableInteriorEnterExits();
    ManualVehicleEngineAndLights();
    MenuSkinauswahl = CreateMenu("Skinauswahl", 3, 20.0, 200.0, 160.0, 0.0);
    AddMenuItem(MenuSkinauswahl, 0, "Weiter");
    AddMenuItem(MenuSkinauswahl, 0, "Zuruck");
    AddMenuItem(MenuSkinauswahl, 0, "OK");
    printf("Textdraws erstelt");
    for(new veh = 0; veh < MAX_VEHICLES; veh++){
    Gas[veh] = GasMax;
    VehicleObject[veh] = -1;
    }
    for(new i = 0; i < sizeof(AdminObjects); i++){
    AdminObjects[i][AObjectID] = -1;
    }
    for(new van = 0; van < 20; van++){
    HackerVans[van][MieterID] = -1;
    HackerVans[van][Aktive] = 0;
    }
    for(new i=0;i<MAX_VEHICLES;i++){
    for(new a=0;a!=4;a++){
    VehicleSlot[i][a][WeaponID] = 0;
    VehicleSlot[i][a][vMunition] = 0;
    }
    }
    News[hTaken1] = 0; News[hTaken2] = 0; News[hTaken3] = 0; News[hTaken4] = 0; News[hTaken5] = 0;
    format(string, sizeof(string), "Nothing");
    strmid(News[hAdd1], string, 0, strlen(string), 255);
    strmid(News[hAdd2], string, 0, strlen(string), 255);
    strmid(News[hAdd3], string, 0, strlen(string), 255);
    strmid(News[hAdd4], string, 0, strlen(string), 255);
    strmid(News[hAdd5], string, 0, strlen(string), 255);
    format(string1, sizeof(string1), "Niemand");
    strmid(News[hContact1], string1, 0, strlen(string1), 255);
    strmid(News[hContact2], string1, 0, strlen(string1), 255);
    strmid(News[hContact3], string1, 0, strlen(string1), 255);
    strmid(News[hContact4], string1, 0, strlen(string1), 255);
    strmid(News[hContact5], string1, 0, strlen(string1), 255);
    PlayerHaul[1][pCapasity] = 150;
    PlayerHaul[2][pCapasity] = 150;
    PlayerHaul[3][pCapasity] = 150;
    PlayerHaul[4][pCapasity] = 150;
    PlayerHaul[5][pCapasity] = 75;
    PlayerHaul[6][pCapasity] = 75;
    PlayerHaul[7][pCapasity] = 75;
    for(new i = 0; i < sizeof(KorierVans); i++){
    KorierVans[i][KRVermietet] = 0;
    KorierVans[i][KRMieterID] = -1;
    KorierVans[i][KRZiehlHaus] = -1;
    KorierVans[i][KRMoney] = 0;
    }
    for(new DBID = 0; DBID < sizeof(DropBoxInfo); DBID++){
    DropBoxInfo[DBID][DBPickupID] = -1;
    }
    for(new i = 0; i < sizeof(AdminCar); i++){
    AdminCar[i][ATOOwnerID] = -1;
    }
    for(new i = 0; i < sizeof(Kaufliste); i++){
    Kaufliste[i][Carid] = CreateVehicle(Kaufliste[i][Modelid],Kaufliste[i][pos_x],Kaufliste[i][pos_y],Kaufliste[i][pos_z],Kaufliste[i][z_angle],-1,-1,-1);
    }
    for(new i = 0; i < sizeof(GangAutoKaufliste); i++){
    new KauflisteString[512];
    GangAutoKaufliste[i][GACarid] = CreateVehicle(GangAutoKaufliste[i][GAModelid],GangAutoKaufliste[i][GApos_x],GangAutoKaufliste[i][GApos_y],GangAutoKaufliste[i][GApos_z],GangAutoKaufliste[i][GAz_angle],-1,-1,1500);
    format(KauflisteString, sizeof(KauflisteString), "Name: %s\nPreis: %s$\nReparaturkosten: %s$", GangAutoKaufliste[i][GAName], GetPoint(GangAutoKaufliste[i][GAPreis]), GetPoint(GangAutoKaufliste[i][GAReparatur]));
    Create3DTextLabel(KauflisteString, 0x21DD00FF, GangAutoKaufliste[i][GApos_x], GangAutoKaufliste[i][GApos_y], GangAutoKaufliste[i][GApos_z]+0.50,10.0,0,1);
    SetVehicleVirtualWorld(GangAutoKaufliste[i][GACarid],0);
    LinkVehicleToInterior(GangAutoKaufliste[i][GACarid],0);
    }
    for(new h = 0; h < sizeof(AutomatikPortInfo); h++){
    AutomatikPortInfo[h][APAusgangPickup] = CreatePickup(1559, 23, AutomatikPortInfo[h][APAusgangX], AutomatikPortInfo[h][APAusgangY], AutomatikPortInfo[h][APAusgangZ],-1);
    AutomatikPortInfo[h][APEingangPickup] = CreatePickup(1559, 23, AutomatikPortInfo[h][APEingangX], AutomatikPortInfo[h][APEingangY], AutomatikPortInfo[h][APEingangZ]+0.2,-1);
    }
    Waffentransporter[1] = CreateVehicle(414, 2618.7483, -2223.7781, 13.3512, 89.6388, -1, -1, 100);
    Waffentransporter[2] = CreateVehicle(414, 2618.4583, -2229.2229, 13.3512, 89.6388, -1, -1, 100);
    Waffentransporter[3] = CreateVehicle(414, 2611.1052, -2223.7903, 13.3512, 89.6388, -1, -1, 100);
    Waffentransporter[4] = CreateVehicle(414, 2610.8577, -2229.2346, 13.3512, 89.6388, -1, -1, 100);
    Waffentransporter[5] = CreateVehicle(414, 2603.6233, -2223.7773, 13.3512, 89.6388, -1, -1, 100);
    Waffentransporter[6] = CreateVehicle(414, 2603.3562, -2229.2625, 13.3512, 89.6388, -1, -1, 100);
    Waffentransporter[7] = CreateVehicle(414, 2595.7329, -2223.7896, 13.3512, 89.6388, -1, -1, 100);
    Waffentransporter[8] = CreateVehicle(414, 2595.3958, -2229.1082, 13.3512, 89.6388, -1, -1, 100);
    for(new h = 0; h < sizeof(GangHausInfo); h++){
    format(string2, sizeof(string2), "Dieses Haus gehört:\n%s",GangHausInfo[h][GHGangName]);
    Create3DTextLabel(string2,COLOR_WHITE,GangHausInfo[h][GHEingangX],GangHausInfo[h][GHEingangY],GangHausInfo[h][GHEingangZ]+1.0,15.0,0,0);
    CreatePickup(1239, 23, GangHausInfo[h][GHEingangX], GangHausInfo[h][GHEingangY], GangHausInfo[h][GHEingangZ]);
    }
    for(new SlotID = 0; SlotID < sizeof(RentSystemInfo); SlotID++){
    RentSystemInfo[SlotID][RSCarID] = CreateVehicle(RentSystemInfo[SlotID][RSModelID],RentSystemInfo[SlotID][RSX],RentSystemInfo[SlotID][RSY],RentSystemInfo[SlotID][RSZ],RentSystemInfo[SlotID][RSRotZ],1,1,300);
    }
    for(new i = 0; i < sizeof(EightBallTrackCars); i++){
    LinkVehicleToInterior(EightBallTrackCars[i], 7);
    SetVehicleVirtualWorld(EightBallTrackCars[i], 10);
    }
    for(new i = 0; i < sizeof(DerbyArenaCars); i++){
    LinkVehicleToInterior(DerbyArenaCars[i], 15);
    SetVehicleVirtualWorld(DerbyArenaCars[i], 10);
    }
    for(new i = 0; i < sizeof(DirtTrackCars); i++){
    LinkVehicleToInterior(DirtTrackCars[i], 4);
    SetVehicleVirtualWorld(DirtTrackCars[i], 10);
    }
    for(new i = 0; i < sizeof(StuntingCars); i++){
    LinkVehicleToInterior(StuntingCars[i], 14);
    SetVehicleVirtualWorld(StuntingCars[i], 10);
    }
    //---------------------------------------------------------------------------------------------
    for(new i = 0; i < sizeof(GangBoxSystem); i++)
    {
    CreateObject(964,GangBoxSystem[i][GWSObjectPosX],GangBoxSystem[i][GWSObjectPosY],GangBoxSystem[i][GWSObjectPosZ],0,0,GangBoxSystem[i][GWSObjectPosRot]);
    }
    for(new i = 0; i < sizeof(SprunkSystemInfo); i++){
    CreateDynamicObject(1775, SprunkSystemInfo[i][SSX],SprunkSystemInfo[i][SSY],SprunkSystemInfo[i][SSZ],SprunkSystemInfo[i][SSRotX],SprunkSystemInfo[i][SSRotY],SprunkSystemInfo[i][SSRotZ]);
    }
    alGate = CreateObject(980, -220.1714, 2613.0977, 64.4015, 0.0, 0.0, 0.0, 100.0);


    //Mission Actors
    Create3DTextLabel("T-Bone Mendez\n[ /gangmission ]", COLOR_WHITE, 2191.9504,-1469.0435,25.6797, 25.0, 0);
    ActorTbone = CreateActor(273, 2191.9504,-1469.0435,25.6797,272.6190);
    ApplyActorAnimation(ActorTbone, "BEACH", "ParkSit_M_loop", 4.1, 1, 0, 0, 0, 0);


    Create3DTextLabel("Cesar Vialpando\n[ /mission ]", COLOR_WHITE, 1793.3022,-2126.4209,13.5469, 20.0, 0);
    ActorCesar = CreateActor(292, 1793.3022,-2126.4209,13.5469,359.8395);
    ApplyActorAnimation(ActorCesar, "BEACH", "bather", 4.1, 1, 0, 0, 0, 0);


    ActorCarlos = CreateActor(44, 265.7122,85.3741,1001.0391,269.8486);


    Create3DTextLabel("Pig Pen\nZum betreten: /enter", COLOR_WHITE, 2421.5386,-1220.1390,25.5038, 20.0, 0);
    Create3DTextLabel("Nutze '/tresorrob' um das Dynamit anzubringen.\nfür Cops '/defuse'\n\nDesktop/ESC gehen Verboten.",COLOR_WHITE,-1978.8785,440.0459,26.7860,20.0,0); //SF
    Create3DTextLabel("Nutze '/tresorrob' um das Dynamit anzubringen.\nfür Cops '/defuse'\n\nDesktop/ESC gehen Verboten.",COLOR_WHITE,307.8822,-1489.5341,24.5938,20.0,0); //LS
    Create3DTextLabel("Nutze '/tresorrob' um das Dynamit anzubringen.\nfür Cops '/defuse'\n\nDesktop/ESC gehen Verboten.",COLOR_WHITE, 2486.1528,2357.7495,4.2109,20.0,0); //LV
    Create3DTextLabel("/menu",COLOR_RED,1189.5106,-894.9534,43.2264,10.0,0,0);
    Create3DTextLabel("/ausruestung",COLOR_RED,1218.1097,-1337.5635,3.0900,10.0,0,0);
    //Timer
    printf("OnGamemodeInt: Timer werden geladen");
    SetTimer("ProTimer", 100, true);
    SetProTimer("SetSekundenTimer1", 100, false);
    SetProTimer("SetSekundenTimer3", 600, false);
    SetProTimer("SetSekundenTimer6", 600, false);
    SetProTimer("SetBlitzTimer", 600, false);
    SetProTimer("STDCheck", 30000, true);
    SetProTimer("CheckGas", 20000, true);
    SetProTimer("MinutenTimer", 55500, true);
    SetProTimer("PickupTimer", 1000, true);
    SetProTimer("Production", 300000, true);
    SetTimer("TextdrawBot", 60000, 1);
    SetTimer("wTimer", 55500, 1);
    TextdrawBot();
    printf("OnGamemodeInt: Timer wurden geladen");
    for(new veh = 0; veh < MAX_VEHICLES; veh++)
    {
    if ( veh != INVALID_VEHICLE_ID && veh != -1 )
    {
    SetVehicleToRespawn(veh);
    sirene[veh] = -1;
    sirene1[veh] = -1;
    sirene2[veh] = -1;
    sirene3[veh] = -1;
    }
    }
    printf("OnGamemodeInt: Fahrzeuge wurden respawnt");
    printf(">>>>> Autos wurden erfolgreich respawnt <<<<<");
    printf(">>>>> Server erfolgreich gestartet <<<<<");
    AddPlayerClass(101,1198.8840,-902.8647,48.0625,90, 0, 0, 0, 0, 0, 0);
    AllowConnect = 1;
    return 1;
    }


    Das SetVehicleToRespawn(veh); unten hab ich auch zum Test schonmal ausgeklammert, hat nichts gebracht.

  • Daraus lässt sich leider auch nicht wirklich etwas ableiten.
    Was ich dir anbieten kann ist, ich denke das geht am geschicktesten dann, dass du mir mal den ganzen Server Ordner per PN schickst, samt Datenbank. Dann teste ich es bei mir am Sonntag (bin morgen nicht zu Hause) aus und schicke dir dann die Lösung.

  • Prinzipiell alles was irgendwie auf das Array zugreift, in das die Tuning IDs geschrieben werden, da die ja zwar drin sind, aber etwas später weg sind.


    Den genauen Grund kann ich dir aber nicht sagen, das kann vieles sein. Das muss man debuggen und eventuell den Code etwas auseinander nehmen.

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