3D Text an Fahrzeug problem :O

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
  • Hallo komme gerade nicht weiter, hab gerade im Wiki geschaut aber bringt mich nicht viel weiter.
    Ich möchte LAbel an die Fahrzeuge hängen,dazu muss die label erst erstellt werden bevor sie attatcht wird oder?

    new Text3D:fahrzeug3D[MAX_VEHICLES],noobroller[7];
    Create3DTextLabel("NF1",0xFF2800FF,0.0,0.0,0.0,50.0,0,1);
    Create3DTextLabel("NF2",0xFF2800FF,0.0,0.0,0.0,50.0,0,1);
    Create3DTextLabel("NF1",0xFF2800FF,0.0,0.0,0.0,50.0,0,1);
    Create3DTextLabel("NF2",0xFF2800FF,0.0,0.0,0.0,50.0,0,1);
    Create3DTextLabel("NF1",0xFF2800FF,0.0,0.0,0.0,50.0,0,1);
    Create3DTextLabel("NF2",0xFF2800FF,0.0,0.0,0.0,50.0,0,1);
    noobroller[0] = AddStaticVehicle(462,-1987.3813,148.4811,27.1059,179.7594,13,13); // roller1
    noobroller[1] = AddStaticVehicle(462,-1987.3904,145.3675,27.1072,179.1660,13,13); // roller2
    noobroller[2] = AddStaticVehicle(462,-1987.3308,142.0002,27.0940,178.8945,13,13); // roller3
    noobroller[3] = AddStaticVehicle(462,-1987.4456,133.3422,27.1088,178.5343,13,13); // roller4
    noobroller[4] = AddStaticVehicle(462,-1987.3724,130.1059,27.1052,183.0501,13,13); // roller5
    noobroller[5] = AddStaticVehicle(462,-1987.2444,127.0686,27.1079,181.5083,13,13); // roller6
    fahrzeug3D[noobroller] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[noobroller],noobroller, 0.0,0.0,2.0);


    Was ist hier falsch gemacht?


    Danke im Vorraus!


    Gute Nacht! :) :sleeping:

  • Morgen =)


    fahrzeug3D[noobroller] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[noobroller],noobroller, 0.0,0.0,2.0);


    zu
    fahrzeug3D[0] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[0],noobroller[0], 0.0,0.0,2.0);
    fahrzeug3D[1] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[1],noobroller[1], 0.0,0.0,2.0);
    fahrzeug3D[2] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[2],noobroller[2], 0.0,0.0,2.0);
    //usw...


  • Morgen ebenfalls ;)


    Da sollte man doch lieber eine schleife setzen ;)
    for(new i=0; i<6; i++){
    fahrzeug3D[i] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[i],noobroller[i], 0.0,0.0,2.0);
    }

  • C:\Users\Hanne\Desktop\SAMP SERVER\gamemodes\SFRP.pwn(68) : error 033: array must be indexed (variable "noobroller")
    Versteh ich nicht ganz, die variable "noobroller" braucht noch etwas. nur mir fällts gerade nicht ein :O


    new Text3D:fahrzeug3D[10],noobroller[15];
    fahrzeug3D[0] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[0],noobroller[0], 0.0,0.0,2.0);
    fahrzeug3D[1] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[1],noobroller[1], 0.0,0.0,2.0);
    fahrzeug3D[2] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[2],noobroller[2], 0.0,0.0,2.0);
    fahrzeug3D[3] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[3],noobroller[3], 0.0,0.0,2.0);
    fahrzeug3D[4] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[4],noobroller[4], 0.0,0.0,2.0);
    fahrzeug3D[5] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[5],noobroller[5], 0.0,0.0,2.0);
    noobroller[0] = AddStaticVehicle(462,-1987.3813,148.4811,27.1059,179.7594,13,13); // roller1
    noobroller[1] = AddStaticVehicle(462,-1987.3904,145.3675,27.1072,179.1660,13,13); // roller2
    noobroller[2] = AddStaticVehicle(462,-1987.3308,142.0002,27.0940,178.8945,13,13); // roller3
    noobroller[3] = AddStaticVehicle(462,-1987.4456,133.3422,27.1088,178.5343,13,13); // roller4
    noobroller[4] = AddStaticVehicle(462,-1987.3724,130.1059,27.1052,183.0501,13,13); // roller5
    noobroller[5] = AddStaticVehicle(462,-1987.2444,127.0686,27.1079,181.5083,13,13); // roller6

  • ^ noobroller[0] = AddStaticVehicle(462,-1987.3813,148.4811,27.1059,179.7594,13,13); // roller1 // angeblich hier aber kommt mir spanisch vor :O
    noobroller[1] = AddStaticVehicle(462,-1987.3904,145.3675,27.1072,179.1660,13,13); // roller2
    noobroller[2] = AddStaticVehicle(462,-1987.3308,142.0002,27.0940,178.8945,13,13); // roller3
    noobroller[3] = AddStaticVehicle(462,-1987.4456,133.3422,27.1088,178.5343,13,13); // roller4
    noobroller[4] = AddStaticVehicle(462,-1987.3724,130.1059,27.1052,183.0501,13,13); // roller5
    noobroller[5] = AddStaticVehicle(462,-1987.2444,127.0686,27.1079,181.5083,13,13); // roller6
    new Text3D:fahrzeug3D[10],noobroller[15];
    fahrzeug3D[0] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[0],noobroller[0], 0.0,0.0,2.0);
    fahrzeug3D[1] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[1],noobroller[1], 0.0,0.0,2.0);
    fahrzeug3D[2] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[2],noobroller[2], 0.0,0.0,2.0);
    fahrzeug3D[3] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[3],noobroller[3], 0.0,0.0,2.0);
    fahrzeug3D[4] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[4],noobroller[4], 0.0,0.0,2.0);
    fahrzeug3D[5] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[5],noobroller[5], 0.0,0.0,2.0);


  • new Text3D:fahrzeug3D[10],noobroller[15];
    noobroller[0] = AddStaticVehicle(462,-1987.3813,148.4811,27.1059,179.7594,13,13); // roller 1
    noobroller[1] = AddStaticVehicle(462,-1987.3904,145.3675,27.1072,179.1660,13,13); // roller2
    noobroller[2] = AddStaticVehicle(462,-1987.3308,142.0002,27.0940,178.8945,13,13); // roller3
    noobroller[3] = AddStaticVehicle(462,-1987.4456,133.3422,27.1088,178.5343,13,13); // roller4
    noobroller[4] = AddStaticVehicle(462,-1987.3724,130.1059,27.1052,183.0501,13,13); // roller5
    noobroller[5] = AddStaticVehicle(462,-1987.2444,127.0686,27.1079,181.5083,13,13); // roller6
    fahrzeug3D[0] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[0],noobroller[0], 0.0,0.0,2.0);
    fahrzeug3D[1] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[1],noobroller[1], 0.0,0.0,2.0);
    fahrzeug3D[2] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[2],noobroller[2], 0.0,0.0,2.0);
    fahrzeug3D[3] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[3],noobroller[3], 0.0,0.0,2.0);
    fahrzeug3D[4] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[4],noobroller[4], 0.0,0.0,2.0);
    fahrzeug3D[5] = Create3DTextLabel("Neulingsfahrzeug",CGRUEN,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(fahrzeug3D[5],noobroller[5], 0.0,0.0,2.0);


    Erst die Definition dann die Autos erstellen.