Was ist falsch? (SetDynamicObjectMaterialText)

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 liebe Community,
    mal wieder brauche ich eure Hilfe. Mein Problem ist das ich mir etwas aus dem prp Script kopiert hab doch das funktioniert bei mir nicht? Es geht um SetDynamicObjectMaterialText.



    Code:
    enum InfoTafelInfo
    {
    Float:itafelx,
    Float:itafely,
    Float:itafelz,
    Float:itafelxrot,
    Float:itafelyrot,
    Float:itafelzrot,
    itafel1text[64],
    itafel1tmindex,
    itafel1tmsize,
    itafel1tfonts[32],
    itafel1tfontsize,
    itafel1tbold,
    itafel1tfontcolor[16],
    itafel1tbackcolor[16],
    itafel1taligment,
    itafel2text[64],
    itafel2tmindex,
    itafel2tmsize,
    itafel2tfonts[32],
    itafel2tfontsize,
    itafel2tbold,
    itafel2tfontcolor[16],
    itafel2tbackcolor[16],
    itafel2taligment,
    itafel3text[64],
    itafel3tmindex,
    itafel3tmsize,
    itafel3tfonts[32],
    itafel3tfontsize,
    itafel3tbold,
    itafel3tfontcolor[16],
    itafel3tbackcolor[16],
    itafel3taligment,
    itafel4text[64],
    itafel4tmindex,
    itafel4tmsize,
    itafel4tfonts[32],
    itafel4tfontsize,
    itafel4tbold,
    itafel4tfontcolor[16],
    itafel4tbackcolor[16],
    itafel4taligment,
    itafel5text[64],
    itafel5tmindex,
    itafel5tmsize,
    itafel5tfonts[32],
    itafel5tfontsize,
    itafel5tbold,
    itafel5tfontcolor[16],
    itafel5tbackcolor[16],
    itafel5taligment
    }
    new InfoTafeln[9][InfoTafelInfo] =
    {
    //Float:itafelx,Float:itafely,Float:itafelz,Float:itafelxrot,Float:itafelyrot,Float:itafelzrot,itafel1text[64],itafel1tmindex,itafel1tmsize,itafel1tfonts[32],itafel1tfontsize,itafel1tbold,itafel1tfontcolor[16],itafel1tbackcolor[16],itafel1taligment,itafel2text[64],itafel2tmindex,itafel2tmsize,itafel2tfonts[32],itafel2tfontsize,itafel2tbold,itafel2tfontcolor[16],itafel2tbackcolor[16],itafel2taligment,
    //itafel3text[64],itafel3tmindex,itafel3tmsize,itafel3tfonts[32],itafel3tfontsize,itafel3tbold,itafel3tfontcolor[16],itafel3tbackcolor[16],itafel3taligment,itafel4text[64],itafel4tmindex,itafel4tmsize,itafel4tfonts[32],itafel4tfontsize,itafel4tbold,itafel4tfontcolor[16],itafel4tbackcolor[16],itafel4taligment,itafel5text[64],itafel5tmindex,itafel5tmsize,itafel5tfonts[32],itafel5tfontsize,itafel5tbold,itafel5tfontcolor[16],itafel5tbackcolor[16],itafel5taligment
    {1221.5,-873.20001220703,42.700000762939,0.00,0.00,8.00,"Herzlich",5,120,"Arial",50,1,-1,-16777216,1,"Willkommen",4,120,"Arial",40,1,-1,-16777216,1,"auf",3,120,"Arial",50,1,-1,-16777216,1,""#SERVERFARBE""#SERVERNAME"",2,120,"Arial",50,1,-1,-16777216,1,"Its Possible 2.0b",1,120,"Arial",50,1,-1,-16777216,1},
    {1222.0,-876.40002441406,42.700000762939,0.00,0.00,10.00,SERVERNAME,5,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"FORUM:"#HTML_RED" "#WEBURL1"",4,120,"Arial",40,1,-1,-16777216,1,""#HTML_WHITE"CP:"#HTML_GOLDENYELLOW" "#UCPWEBURL1"",3,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"TS:"#HTML_GOLDENYELLOW" "#TSIP2"",2,120,"Arial",50,1,-1,-16777216,1,"ITS POSSIBLE 2.0b",1,120,"Arial",50,1,-1,-16777216,1},
    {1361.04,-1018.94,29.43,0.00,0.00,0.00,SERVERNAME,5,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"FORUM:"#HTML_RED" "#WEBURL1"",4,120,"Arial",40,1,-1,-16777216,1,""#HTML_WHITE"CP:"#HTML_GOLDENYELLOW" "#UCPWEBURL1"",3,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"TS:"#HTML_GOLDENYELLOW" "#TSIP2"",2,120,"Arial",50,1,-1,-16777216,1,"ITS POSSIBLE 2.0b",1,120,"Arial",50,1,-1,-16777216,1},
    {1811.5196,-1622.2359,14.8919,0.00,0.00,144.0482,SERVERNAME,5,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"FORUM:"#HTML_RED" "#WEBURL1"",4,120,"Arial",40,1,-1,-16777216,1,""#HTML_WHITE"CP:"#HTML_GOLDENYELLOW" "#UCPWEBURL1"",3,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"TS:"#HTML_GOLDENYELLOW" "#TSIP2"",2,120,"Arial",50,1,-1,-16777216,1,"ITS POSSIBLE 2.0b",1,120,"Arial",50,1,-1,-16777216,1},
    {1479.4411,-1794.4844,16.4419,0.00,0.00,179.4481,SERVERNAME,5,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"FORUM:"#HTML_RED" "#WEBURL1"",4,120,"Arial",40,1,-1,-16777216,1,""#HTML_WHITE"CP:"#HTML_GOLDENYELLOW" "#UCPWEBURL1"",3,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"TS:"#HTML_GOLDENYELLOW" "#TSIP2"",2,120,"Arial",50,1,-1,-16777216,1,"ITS POSSIBLE 2.0b",1,120,"Arial",50,1,-1,-16777216,1},
    {383.0843,-2078.9709,10.1559,0.00,0.00,-179.5509,SERVERNAME,5,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"FORUM:"#HTML_RED" "#WEBURL1"",4,120,"Arial",40,1,-1,-16777216,1,""#HTML_WHITE"CP:"#HTML_GOLDENYELLOW" "#UCPWEBURL1"",3,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"TS:"#HTML_GOLDENYELLOW" "#TSIP2"",2,120,"Arial",50,1,-1,-16777216,1,"ITS POSSIBLE 2.0b",1,120,"Arial",50,1,-1,-16777216,1},
    {1108.3337,-1301.8652,16.1642,0.00,0.00,1.2547,SERVERNAME,5,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"FORUM:"#HTML_RED" "#WEBURL1"",4,120,"Arial",40,1,-1,-16777216,1,""#HTML_WHITE"CP:"#HTML_GOLDENYELLOW" "#UCPWEBURL1"",3,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"TS:"#HTML_GOLDENYELLOW" "#TSIP2"",2,120,"Arial",50,1,-1,-16777216,1,"ITS POSSIBLE 2.0b",1,120,"Arial",50,1,-1,-16777216,1},
    {1614.9188,-1248.3789,19.8072,0.00,0.00,135.8282,SERVERNAME,5,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"FORUM:"#HTML_RED" "#WEBURL1"",4,120,"Arial",40,1,-1,-16777216,1,""#HTML_WHITE"CP:"#HTML_GOLDENYELLOW" "#UCPWEBURL1"",3,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"TS:"#HTML_GOLDENYELLOW" "#TSIP2"",2,120,"Arial",50,1,-1,-16777216,1,"ITS POSSIBLE 2.0b",1,120,"Arial",50,1,-1,-16777216,1},
    {1632.1575,-859.1402,60.1496,0.00,0.00,-28.1897,SERVERNAME,5,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"FORUM:"#HTML_RED" "#WEBURL1"",4,120,"Arial",40,1,-1,-16777216,1,""#HTML_WHITE"CP:"#HTML_GOLDENYELLOW" "#UCPWEBURL1"",3,120,"Arial",50,1,-1,-16777216,1,""#HTML_WHITE"TS:"#HTML_GOLDENYELLOW" "#TSIP2"",2,120,"Arial",50,1,-1,-16777216,1,"ITS POSSIBLE 2.0b",1,120,"Arial",50,1,-1,-16777216,1}
    };
    for(new i=0;i<sizeof(InfoTafeln);i++)
    {
    new obj=CreateObject(5811, 1500.76, -1783.90, 16.02, 0.00, 0.00, 48.00);
    new obj2=CreateObject(5811, 1462.61, -1784.75, 16.02, 0.00, 0.00, -32.58);
    SetDynamicObjectMaterialText(obj,InfoTafeln[i][itafel1tmindex],InfoTafeln[i][itafel1text],InfoTafeln[i][itafel1tmsize],InfoTafeln[i][itafel1tfonts],InfoTafeln[i][itafel1tfontsize],InfoTafeln[i][itafel1tbold],InfoTafeln[i][itafel1tfontcolor],InfoTafeln[i][itafel1tbackcolor],InfoTafeln[i][itafel1taligment]);
    SetDynamicObjectMaterialText(obj2,InfoTafeln[i][itafel2tmindex],InfoTafeln[i][itafel2text],InfoTafeln[i][itafel2tmsize],InfoTafeln[i][itafel2tfonts],InfoTafeln[i][itafel2tfontsize],InfoTafeln[i][itafel2tbold],InfoTafeln[i][itafel2tfontcolor],InfoTafeln[i][itafel2tbackcolor],InfoTafeln[i][itafel2taligment]);
    }




    Mit freundlichen Grüßen,
    DexterA1

  • @DexterA1:


    Du kannst es gerne versuchen,
    Aber benutz mal den Neuen Streamer von Code.google.xxxx ka wie es weiter geht :D


    Was fürn BS ist das denn?


    Also erstmal was funzt nicht? Wirds nicht angezeigt oder falsch oder wie?

    __________________________________________


    Scripter & Programmierer im Ruhestand

    Derzeitiges Projekt:
    __________________________________________

  • Da steht doch eindeutig das es im Streamer drin ist:

    native SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);

    Wie mans auch am ersten beispiel sehen kann

    __________________________________________


    Scripter & Programmierer im Ruhestand

    Derzeitiges Projekt:
    __________________________________________

  • Du musst die Objecte auch mit CreateDynamicObject reinschreiben , du hast nämlich CreateObject :)

  • Pack es mal so hin


    SetDynamicObjectMaterialText(CrateDynamicObject(deinobject), dein text bla );


    Lg :)


    Edit : Natürlich SetDynamicObjectMaterialText :)


    - Handy