Dialogs werden nicht Angezeigt

  • Hallo alle mit einander,


    Ich hab ein kleines Problem:


    Ich hab in meinem Script ein neuen Dialog hinzugefügt wie sonst auch. Nun ist aber das Problem, dass mein Dialog nicht geöffnet wird. vielleicht könnt ihr den Fehler entdecken.


    ShowDialog:TuningGarage_Neon(playerID)
    {
    new list[1024];
    ConcatString(list, LanguageString(playerID, StringID:251("Neon Color: Green")), "\n");
    ConcatString(list, LanguageString(playerID, StringID:252("Neon Color: Blue")), "\n");
    ConcatString(list, LanguageString(playerID, StringID:253("Neon Color: Yellow")), "\n");
    ConcatString(list, LanguageString(playerID, StringID:254("Neon Color: Violet")), "\n");
    ConcatString(list, LanguageString(playerID, StringID:255("Neon Color: White")), "\n");
    ConcatString(list, LanguageString(playerID, StringID:256("Neon Color: Red")), "\n");
    printf("Dialog loading....");
    CreateDialog(playerID, "TuningGarage_Neon", DIALOG_STYLE_LIST, LanguageString(playerID, StringID:257("Select a Neon")), list, LanguageString(playerID, StringID:37("Next")), LanguageString(playerID, StringID:4("Cancel")));
    printf("Dialog loaded");
    }


    DialogResponse:TuningGarage_Neon(playerID, response, listItem, inputText[])
    {
    if (response)
    {
    new tuningPartIndex;
    new XMLNode:xml = XML_LoadDocument("vehiclemodels.xml");
    xml = XML_GetFirstChild(xml, "vehiclemodels");
    new XMLNode:modelNode = XML_GetFirstChild(xml, "model");
    while (modelNode)
    {
    new modelID = XML_GetIntAttribute(modelNode, "id");
    if (modelID < 400 || modelID > 611)
    {
    printf("Invalid vehicle model ID: %d", modelID);
    modelNode = XML_GetNextSibling(modelNode, "model");
    continue;
    }


    new arrayIndex = modelID - 400;// First array element starts with 0, vehicle models are starting with 400 (400 - 400 = 0, 401 - 400 = 1, ...)


    new tuningPartSlot;
    new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");
    if (neonNode)
    {
    new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");
    new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");
    new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");
    new neonPrice = XML_GetIntAttribute(neonNode, "price");


    for (new neonModelID = 18647; neonModelID <= 18652; neonModelID++)
    {
    if (tuningPartSlot >= MAX_TUNINGPARTSPERVEHICLE)
    {
    printf("Reached limit of %d tuning parts for vehicle %d", MAX_TUNINGPARTSPERVEHICLE, modelID);
    break;
    }


    g_tuningParts[tuningPartIndex][E_TUNINGPART_MODELID] = neonModelID;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_PRICE] = neonPrice;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_TYPE] = TUNINGPART_NEON;


    // Left side
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][0] = -neonPosX;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][0] = neonPosY;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][0] = neonPosZ;


    // Right side
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][1] = neonPosX;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][1] = neonPosY;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][1] = neonPosZ;


    g_vehicleModels[arrayIndex][E_VEHICLEMODEL_TUNINGPARTS][tuningPartSlot] = tuningPartIndex;


    tuningPartSlot++;
    tuningPartIndex++;
    }
    }
    }
    if (listItem == 1)//Green
    {
    if (GetPlayerMoney(playerID) < TUNINGGARAGE_PRICE_NEON)
    {
    GameTextForPlayer(playerID, LanguageString(playerID, StringID:80("You do not have enough money!")), 3000, 3);
    ShowDialog:TuningGarage_Neon(playerID);
    }
    else
    {
    new vehicleID = GetPlayerVehicleID(playerID);
    new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");
    if (neonNode)
    {
    new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");
    new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");
    new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");


    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0] = CreateObject(18649,0,0,0,0,0,0);
    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1] = CreateObject(18649,0,0,0,0,0,0);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0], GetPlayerVehicleID(playerID), -neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1], GetPlayerVehicleID(playerID), neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);


    MySQLFormat("UPDATE `vehiclecomponents` SET `componentId` = %d WHERE `vehicleId` = %d AND `slot` = %d", GetVehicleComponentInSlot(vehicleID, CARMODTYPE_NEON), VehicleProperty:vehicleID[SAVEID], CARMODTYPE_NEON);// Neon changes without beeing in a mod shop
    mysql_pquery(g_mysql, g_sqlQuery);


    ShowDialog:TuningGarage_Neon(playerID);
    }
    }
    }
    else
    {
    ShowDialog:TuningGarage_CategoryTypes(playerID, listItem);
    }
    if (listItem == 2) //Blue
    {
    if (GetPlayerMoney(playerID) < TUNINGGARAGE_PRICE_NEON)
    {
    GameTextForPlayer(playerID, LanguageString(playerID, StringID:80("You do not have enough money!")), 3000, 3);
    ShowDialog:TuningGarage_Neon(playerID);
    }
    else
    {
    new vehicleID = GetPlayerVehicleID(playerID);
    new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");
    if (neonNode)
    {
    new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");
    new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");
    new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");


    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0] = CreateObject(18648,0,0,0,0,0,0);
    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1] = CreateObject(18648,0,0,0,0,0,0);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0], GetPlayerVehicleID(playerID), -neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1], GetPlayerVehicleID(playerID), neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);


    MySQLFormat("UPDATE `vehiclecomponents` SET `componentId` = %d WHERE `vehicleId` = %d AND `slot` = %d", GetVehicleComponentInSlot(vehicleID, CARMODTYPE_NEON), VehicleProperty:vehicleID[SAVEID], CARMODTYPE_NEON);// Neon changes without beeing in a mod shop
    mysql_pquery(g_mysql, g_sqlQuery);


    ShowDialog:TuningGarage_Neon(playerID);
    }
    }
    }
    if (listItem == 3) //Yellow
    {
    if (GetPlayerMoney(playerID) < TUNINGGARAGE_PRICE_NEON)
    {
    GameTextForPlayer(playerID, LanguageString(playerID, StringID:80("You do not have enough money!")), 3000, 3);
    ShowDialog:TuningGarage_Neon(playerID);
    }
    else
    {
    new vehicleID = GetPlayerVehicleID(playerID);
    new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");
    if (neonNode)
    {
    new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");
    new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");
    new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");



    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0] = CreateObject(18650,0,0,0,0,0,0);
    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1] = CreateObject(18650,0,0,0,0,0,0);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0], GetPlayerVehicleID(playerID), -neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1], GetPlayerVehicleID(playerID), neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);


    MySQLFormat("UPDATE `vehiclecomponents` SET `componentId` = %d WHERE `vehicleId` = %d AND `slot` = %d", GetVehicleComponentInSlot(vehicleID, CARMODTYPE_NEON), VehicleProperty:vehicleID[SAVEID], CARMODTYPE_NEON);// Neon changes without beeing in a mod shop
    mysql_pquery(g_mysql, g_sqlQuery);


    ShowDialog:TuningGarage_Neon(playerID);
    }
    }
    }
    if (listItem == 4) //Violet
    {
    if (GetPlayerMoney(playerID) < TUNINGGARAGE_PRICE_NEON)
    {
    GameTextForPlayer(playerID, LanguageString(playerID, StringID:80("You do not have enough money!")), 3000, 3);
    ShowDialog:TuningGarage_Neon(playerID);
    }
    else
    {
    new vehicleID = GetPlayerVehicleID(playerID);
    new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");
    if (neonNode)
    {
    new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");
    new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");
    new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");



    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0] = CreateObject(18651,0,0,0,0,0,0);
    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1] = CreateObject(18651,0,0,0,0,0,0);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0], GetPlayerVehicleID(playerID), -neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1], GetPlayerVehicleID(playerID), neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);


    MySQLFormat("UPDATE `vehiclecomponents` SET `componentId` = %d WHERE `vehicleId` = %d AND `slot` = %d", GetVehicleComponentInSlot(vehicleID, CARMODTYPE_NEON), VehicleProperty:vehicleID[SAVEID], CARMODTYPE_NEON);// Neon changes without beeing in a mod shop
    mysql_pquery(g_mysql, g_sqlQuery);


    ShowDialog:TuningGarage_Neon(playerID);
    }
    }
    }
    if (listItem == 5) //White
    {
    if (GetPlayerMoney(playerID) < TUNINGGARAGE_PRICE_NEON)
    {
    GameTextForPlayer(playerID, LanguageString(playerID, StringID:80("You do not have enough money!")), 3000, 3);
    ShowDialog:TuningGarage_Neon(playerID);
    }
    else
    {
    new vehicleID = GetPlayerVehicleID(playerID);
    new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");
    if (neonNode)
    {
    new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");
    new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");
    new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");



    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0] = CreateObject(18652,0,0,0,0,0,0);
    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1] = CreateObject(18652,0,0,0,0,0,0);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0], GetPlayerVehicleID(playerID), -neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1], GetPlayerVehicleID(playerID), neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);


    MySQLFormat("UPDATE `vehiclecomponents` SET `componentId` = %d WHERE `vehicleId` = %d AND `slot` = %d", GetVehicleComponentInSlot(vehicleID, CARMODTYPE_NEON), VehicleProperty:vehicleID[SAVEID], CARMODTYPE_NEON);// Neon changes without beeing in a mod shop
    mysql_pquery(g_mysql, g_sqlQuery);


    ShowDialog:TuningGarage_Neon(playerID);
    }
    }
    }
    if (listItem == 6) //Red
    {
    if (GetPlayerMoney(playerID) < TUNINGGARAGE_PRICE_NEON)
    {
    GameTextForPlayer(playerID, LanguageString(playerID, StringID:80("You do not have enough money!")), 3000, 3);
    ShowDialog:TuningGarage_Neon(playerID);
    }
    else
    {
    new vehicleID = GetPlayerVehicleID(playerID);
    new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");
    if (neonNode)
    {
    new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");
    new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");
    new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");



    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0] = CreateObject(18647,0,0,0,0,0,0);
    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1] = CreateObject(18647,0,0,0,0,0,0);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0], GetPlayerVehicleID(playerID), -neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1], GetPlayerVehicleID(playerID), neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);


    MySQLFormat("UPDATE `vehiclecomponents` SET `componentId` = %d WHERE `vehicleId` = %d AND `slot` = %d", GetVehicleComponentInSlot(vehicleID, CARMODTYPE_NEON), VehicleProperty:vehicleID[SAVEID], CARMODTYPE_NEON);// Neon changes without beeing in a mod shop
    mysql_pquery(g_mysql, g_sqlQuery);


    ShowDialog:TuningGarage_Neon(playerID);
    }
    }
    }
    }
    else
    {
    SaveVehicle(PVar:playerID[TUNINGGARAGE_VEHICLEID]);


    SetPlayerVirtualWorld(playerID, 0);


    new tuningGarageNumber = PVar:playerID[TUNINGGARAGE_NUMBER];


    SetPlayerSpawn(playerID, SPAWNTYPE_EXITTUNINGGARAGE, g_tuningGarages[tuningGarageNumber][E_TUNINGGARAGE_VEHICLE_POSX], g_tuningGarages[tuningGarageNumber][E_TUNINGGARAGE_VEHICLE_POSY], g_tuningGarages[tuningGarageNumber][E_TUNINGGARAGE_VEHICLE_POSZ], g_tuningGarages[tuningGarageNumber][E_TUNINGGARAGE_VEHICLE_ANGLE]);


    TogglePlayerSpectating(playerID, false);


    PVar:playerID[ALLOWCMDS] = true;
    }
    }


    In meinem Dialog vom Menü klicke ich auf Neon und es kommt einfach garnichts... Weder das Menü Dialog noch das Neon Dialog.
    Da ich für die weiteren nur eine rück leitung zum Menü Dialog erstellt habe kommt dort auch immer das Menü Dialog. Geh ich aber dann wieder auf Neon, ist mein Dialog komplett weg. Der neue wird erst garnicht erstellt.


    Laut Debug kommt er aber soweit. sogar über das CreateDialog.

    Der Server: [GRG]Grand Racing Game wurde 2014 Eingestampft.
    Weitere Infos: Klick Mich

  • Kurze frage ist das für SA:MP ?

    Das ist definitiv.


    Aber dadurch dass du so viele Includes verwendest und man dadurch über vieles keinerlei Informationen hat, was dort eigentlich passiert, ist es hier relativ schwer dir zu helfen.

    LeonMrBonnie.de


    Scripting

    JavaScript Programmierer

    Auch im Bereich GTA:V und dort der RageMP oder alt:V API helfe ich gern.


    Kontakt

    Konversation: Konversation starten

    Oder eine der Kontaktmöglichkeiten auf leonmrbonnie.de

  • naja nicht wirklich erfolg dabei, er durchläuft alles sauber und zeigt mir die im XML hinterlegten positionen richtig an


    So jetzt hab ich herrausgefunden dass er genau da:


    DialogResponse:TuningGarage_Neon(playerID, response, listItem, inputText[]){if (response){new tuningPartIndex;new XMLNode:xml = XML_LoadDocument("vehiclemodels.xml");xml = XML_GetFirstChild(xml, "vehiclemodels");new XMLNode:modelNode = XML_GetFirstChild(xml, "model");while (modelNode){new modelID = XML_GetIntAttribute(modelNode, "id");if (modelID < 400 || modelID > 611){printf("Invalid vehicle model ID: %d", modelID);modelNode = XML_GetNextSibling(modelNode, "model");continue;}new arrayIndex = modelID - 400;// First array element starts with 0, vehicle models are starting with 400 (400 - 400 = 0, 401 - 400 = 1, ...)new tuningPartSlot;new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");if (neonNode){new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");new neonPrice = XML_GetIntAttribute(neonNode, "price");for (new neonModelID = 18647; neonModelID <= 18652; neonModelID++){if (tuningPartSlot >= MAX_TUNINGPARTSPERVEHICLE){break;}g_tuningParts[tuningPartIndex][E_TUNINGPART_MODELID] = neonModelID;g_tuningParts[tuningPartIndex][E_TUNINGPART_PRICE] = neonPrice;g_tuningParts[tuningPartIndex][E_TUNINGPART_TYPE] = TUNINGPART_NEON;// Left sideg_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][0] = -neonPosX;g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][0] = neonPosY;g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][0] = neonPosZ;// Right sideg_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][1] = neonPosX;g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][1] = neonPosY;g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][1] = neonPosZ;g_vehicleModels[arrayIndex][E_VEHICLEMODEL_TUNINGPARTS][tuningPartSlot] = tuningPartIndex;tuningPartSlot++;tuningPartIndex++;printf("PosX = %f, PosY = %f, PosZ = %f", neonPosX, neonPosY, neonPosZ); //Genau bis hier hin geht er}}}if (listItem == 1)//Green{if (GetPlayerMoney(playerID) < TUNINGGARAGE_PRICE_NEON){GameTextForPlayer(playerID, LanguageString(playerID, StringID:80("You do not have enough money!")), 3000, 3);ShowDialog:TuningGarage_Neon(playerID);}else{printf("Neon Green used...");new vehicleID = GetPlayerVehicleID(playerID);new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");if (neonNode){new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");printf("PosX = %f, PosY = %f, PosZ = %f", neonPosX, neonPosY, neonPosZ);g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0] = CreateObject(18649,0,0,0,0,0,0);g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1] = CreateObject(18649,0,0,0,0,0,0);AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0], GetPlayerVehicleID(playerID), -neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1], GetPlayerVehicleID(playerID), neonPosX, neonPosY, neonPosZ, 0.000000, 0.000000, 0.000000);printf("Attaching on Vehicle %d", vehicleID);ShowDialog:TuningGarage_Neon(playerID);}}}else{ShowDialog:TuningGarage_CategoryTypes(playerID, listItem);}


    Wo ich es grün hinterlegt habe, kommt allerdings crasht er vorher und zeigt mir die Position millionen fach an mit der folgenden log:
    [2019-10-16 21:47:49] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
    [2019-10-16 21:47:49] [debug] Stack pointer (STK) is 0x9D1504, heap pointer (HEA) is 0x9D1650
    [2019-10-16 21:47:49] [debug] AMX backtrace:
    [2019-10-16 21:47:49] [debug] #0 00013120 in ?? (60, 257) from grgserver.amx
    [2019-10-16 21:47:49] [debug] #1 0003f2f0 in ?? (60) from grgserver.amx
    [2019-10-16 21:47:49] [debug] #2 0003d3f0 in ?? (60, 3) from grgserver.amx
    [2019-10-16 21:47:49] [debug] #3 0003e4ac in public DR_TuningGarage_MainMenu (60, 1, 3, 10291772) from grgserv$
    [2019-10-16 21:47:49] [debug] #4 native CallLocalFunction () from samp03svr
    [2019-10-16 21:47:49] [debug] #5 0002ca50 in public OnDialogResponse (60, 0, 1, 3, 10291752) from grgserver.amx
    [2019-10-16 21:47:51] PosX = -0.924996, PosY = 0.009998, PosZ = -0.674996
    [2019-10-16 21:47:51] PosX = -0.924996, PosY = 0.009998, PosZ = -0.674996
    [2019-10-16 21:47:51] PosX = -0.924996, PosY = 0.009998, PosZ = -0.674996
    [2019-10-16 21:47:51] PosX = -0.924996, PosY = 0.009998, PosZ = -0.674996




    Nach viel Rumprobieren hab ich nun jede Röhren Farbe auf das geändert...


    if (listItem == 1)//Green
    {
    new count;
    new tuningPartIndex;
    new XMLNode:xml = XML_LoadDocument("vehiclemodels.xml");
    xml = XML_GetFirstChild(xml, "vehiclemodels");
    new XMLNode:modelNode = XML_GetFirstChild(xml, "model");
    while (modelNode)
    {
    new XMLNode:neonNode = XML_GetFirstChild(modelNode, "neon");
    if (neonNode)
    {
    new Float:neonPosX = XML_GetFloatAttribute(neonNode, "x");
    new Float:neonPosY = XML_GetFloatAttribute(neonNode, "y");
    new Float:neonPosZ = XML_GetFloatAttribute(neonNode, "z");
    g_tuningParts[tuningPartIndex][E_TUNINGPART_TYPE] = TUNINGPART_NEON;


    // Left side
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][0] = -neonPosX;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][0] = neonPosY;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][0] = neonPosZ;


    // Right side
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][1] = neonPosX;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][1] = neonPosY;
    g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][1] = neonPosZ;


    tuningPartIndex++;


    count++;
    modelNode = XML_GetNextSibling(modelNode, "model");
    }
    }


    if (GetPlayerMoney(playerID) < TUNINGGARAGE_PRICE_NEON)
    {
    GameTextForPlayer(playerID, LanguageString(playerID, StringID:80("You do not have enough money!")), 3000, 3);
    ShowDialog:TuningGarage_Neon(playerID);
    }
    else
    {
    printf("Neon Green used...");


    printf("PosX = %f, PosY = %f, PosZ = %f", g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][0], g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][0], g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][0]);
    printf("2 Position PosX = %f, PosY = %f, PosZ = %f", g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][1], g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][1], g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][1]);
    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0] = CreateObject(18649,0,0,0,0,0,0);
    g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1] = CreateObject(18649,0,0,0,0,0,0);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][0], GetPlayerVehicleID(playerID), g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][0], g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][0], g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][0], 0.000000, 0.000000, 0.000000);
    AttachObjectToVehicle(g_tuningParts[tuningPartIndex][E_TUNINGPART_NEON][1], GetPlayerVehicleID(playerID), g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_X][1], g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Y][1], g_tuningParts[tuningPartIndex][E_TUNINGPART_OFFSET_Z][1], 0.000000, 0.000000, 0.000000);


    ShowDialog:TuningGarage_Neon(playerID);
    }
    XML_UnloadDocument(xml);
    }
    else
    {
    ShowDialog:TuningGarage_CategoryTypes(playerID, listItem);
    }


    Da ich der meinung war, dass es da durch kommt das ich die XML schon nach den response auslese... dennoch immer noch das gleiche mit dem Crashen und meinie Printf zeigt er erst garnicht an...


    Nicht mal wenn ich nicht genug geld habe, bringt er mir irgend etwas...

    Der Server: [GRG]Grand Racing Game wurde 2014 Eingestampft.
    Weitere Infos: Klick Mich

    2 Mal editiert, zuletzt von AeroxTobi ()