Texturen ändern

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
  • Moin moin


    ich möchte ein Textur vom Boden ändern bzw. mehre Böden angleichen mit dem Boden der Umgebung nur stoße ich momentan auf starken widerstand und hoffe das mir hier vielleicht wer helfen kann...




    //ADAC Boden Neu
    bild[0] = CreateDynamicObject(6959,829.8400000,-1259.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    bild[1] = CreateDynamicObject(6959,829.8700000,-1219.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    bild[2] = CreateDynamicObject(6959,871.1800000,-1259.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    bild[3] = CreateDynamicObject(6959,871.2100000,-1219.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    bild[4] = CreateDynamicObject(6959,886.9000000,-1259.1100000,13.8500000,0.0000000,0.0000000,0.0000000); //
    bild[5] = CreateDynamicObject(6959,829.8400000,-1288.8300000,13.8700000,0.0000000,0.0000000,0.0000000); //
    bild[6] = CreateDynamicObject(6959,871.1800000,-1288.5200000,13.8700000,0.0000000,0.0000000,0.0000000); //
    bild[7] = CreateDynamicObject(6959,886.9000000,-1288.6800000,13.8600000,0.0000000,0.0000000,0.0000000); //
    //SetObjekt
    SetObjectMaterial( bild[0],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( bild[1],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( bild[2],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( bild[3],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( bild[4],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( bild[5],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( bild[6],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( bild[7],0,5864,"filmstud","stageside1","greyground256128"); //



    Fehlermeldung:



    C:\Users\Sonderbarr\Desktop\script.pwn(360) : error 028: invalid subscript (not an array or too many subscripts): "bild"
    C:\Users\Sonderbarr\Desktop\script.pwn(360) : warning 215: expression has no effect
    C:\Users\Sonderbarr\Desktop\script.pwn(360) : error 001: expected token: ";", but found "]"
    C:\Users\Sonderbarr\Desktop\script.pwn(360) : error 029: invalid expression, assumed zero
    C:\Users\Sonderbarr\Desktop\script.pwn(360) : fatal error 107: too many error messages on one line



    enum:



    enum BildEnum{
    bild,
    bild1,
    bild2,
    bild3,
    bild4,
    bild5,
    bild6,
    bild7
    }


    vielleicht kann mir ja einer weiter helfen


    MfG


    Sonderbarr

  • enum BildEnum{
    bild,
    bild1,
    bild2,
    bild3,
    bild4,
    bild5,
    bild6,
    bild7
    };


    new BildVariable[BildEnum];


    //ADAC Boden Neu
    BildVariable[bild] = CreateDynamicObject(6959,829.8400000,-1259.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    BildVariable[bild1] = CreateDynamicObject(6959,829.8700000,-1219.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    BildVariable[bild2] = CreateDynamicObject(6959,871.1800000,-1259.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    BildVariable[bild3] = CreateDynamicObject(6959,871.2100000,-1219.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    BildVariable[bild4] = CreateDynamicObject(6959,886.9000000,-1259.1100000,13.8500000,0.0000000,0.0000000,0.0000000); //
    BildVariable[bild5] = CreateDynamicObject(6959,829.8400000,-1288.8300000,13.8700000,0.0000000,0.0000000,0.0000000); //
    BildVariable[bild6] = CreateDynamicObject(6959,871.1800000,-1288.5200000,13.8700000,0.0000000,0.0000000,0.0000000); //
    BildVariable[bild7] = CreateDynamicObject(6959,886.9000000,-1288.6800000,13.8600000,0.0000000,0.0000000,0.0000000); //
    //SetObjekt
    SetObjectMaterial( BildVariable[bild],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild1],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild2],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild3],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild4],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild5],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild6],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild7],0,5864,"filmstud","stageside1","greyground256128"); //
    Du hast die Variablen nicht richtig verwendet, oder sehe ich das falsch?

  • Wenn ich das so wie du rein nehme in mein Script dann kommen die Fehlermeldungen ^^




    C:\Users\Sonderbarr\Desktop\script.pwn(359) : warning 217: loose indentation
    C:\Users\Sonderbarr\Desktop\script.pwn(362) : warning 217: loose indentation
    C:\Users\Sonderbarr\Desktop\script.pwn(362) : error 017: undefined symbol "bild"
    C:\Users\Sonderbarr\Desktop\script.pwn(371) : error 017: undefined symbol "bild"
    C:\Users\Sonderbarr\Desktop\script.pwn(372) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(373) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(374) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(375) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(376) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(377) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(378) : error 035: argument type mismatch (argument 6)



    ich sitz nun schon 8 Stunden dran und finde nicht den richtigen weg o0

  • Zeig die Zeilen mal her, die kannst du so einfügen:

    Code
    [pwn=ZEILEN_ANFANG][/pwn]
  • ICy ich habe das so rein kopiert wie du es gepostet hattes um zu sehen ob ich mit deinem Erfolg habe und bei diesen Zeilen spinnt er Rum und bringt mir die Fehlermeldungen


    jetzt sagt er mir das in diesen zeilen der fehler ist:



    SetObjectMaterial( BildVariable[bild0],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild1],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild2],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild3],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild4],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild5],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild6],0,5864,"filmstud","stageside1","greyground256128"); //
    SetObjectMaterial( BildVariable[bild7],0,5864,"filmstud","stageside1","greyground256128"); //




    C:\Users\Sonderbarr\Desktop\script.pwn(371) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(372) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(373) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(374) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(375) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(376) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(377) : error 035: argument type mismatch (argument 6)
    C:\Users\Sonderbarr\Desktop\script.pwn(378) : error 035: argument type mismatch (argument 6)

  • Erst einmal musst du nicht SetObjectMaterial benutzen, sondern SetDynamicObjectMaterial.
    Außerdem darf der 6. Parameter (greyground256128) kein String sein, sondern das muss eine Farbe sein ;)

  • warum so viel text wen es doch soooo einfach geht :)




    new bild[8];
    bild[0] = CreateDynamicObject(6959,829.8400000,-1259.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    bild[1] = CreateDynamicObject(6959,829.8700000,-1219.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    bild[2] = CreateDynamicObject(6959,871.1800000,-1259.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    bild[3] = CreateDynamicObject(6959,871.2100000,-1219.1100000,13.8800000,0.0000000,0.0000000,0.0000000); //
    bild[4] = CreateDynamicObject(6959,886.9000000,-1259.1100000,13.8500000,0.0000000,0.0000000,0.0000000); //
    bild[5] = CreateDynamicObject(6959,829.8400000,-1288.8300000,13.8700000,0.0000000,0.0000000,0.0000000); //
    bild[6] = CreateDynamicObject(6959,871.1800000,-1288.5200000,13.8700000,0.0000000,0.0000000,0.0000000); //
    bild[7] = CreateDynamicObject(6959,886.9000000,-1288.6800000,13.8600000,0.0000000,0.0000000,0.0000000); //
    for(new i = 0; i < sizeof(bild); i++)
    {
    SetDynamicObjectMaterial(bild[i],0,5864,"filmstud","stageside1","greyground256128");
    }

    so einfach is das und geht viel schneller was einige hier für metoden aufbauen is der lacher :D