PlayerTextdraw Updaten

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
  • Hi,


    Bei meinen Textdraws Geld und Level steht ingame nur Geld: 0 und Level:= obwohl mir oben bei der geldanzeige mehr angezeigt wird .(


    format(SD,sizeof(SD),"Level: %i",sInfo[playerid][level]);
    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,SD);
    PlayerTextDrawLetterSize(playerid, LevelDraw[playerid], 0.229999, 1.576666);
    PlayerTextDrawAlignment(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawColor(playerid, LevelDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, LevelDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LevelDraw[playerid], 51);
    PlayerTextDrawFont(playerid, LevelDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, LevelDraw[playerid], 1);


    format(GD,sizeof(GD),"Geld: %i",GetPlayerMoney(playerid));
    GeldDraw[playerid] = CreatePlayerTextDraw(playerid, 536.875000, 352.333160,GD);
    PlayerTextDrawLetterSize(playerid, GeldDraw[playerid], 0.286249, 1.494999);
    PlayerTextDrawAlignment(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawColor(playerid, GeldDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, GeldDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, GeldDraw[playerid], 51);
    PlayerTextDrawFont(playerid, GeldDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, GeldDraw[playerid], 1);


    //////////////////////////////////////
    Hi, bei SetObjetMaterialText wie mache ich die schrift an objekte die schon ingame sind also nix gemapptes z.B an standart Stadhalle

    2 Mal editiert, zuletzt von Maurice. ()

  • Lass die mal so erstellen:



    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,"Level");
    PlayerTextDrawLetterSize(playerid, LevelDraw[playerid], 0.229999, 1.576666);
    PlayerTextDrawAlignment(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawColor(playerid, LevelDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, LevelDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LevelDraw[playerid], 51);
    PlayerTextDrawFont(playerid, LevelDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, LevelDraw[playerid], 1);


    GeldDraw[playerid] = CreatePlayerTextDraw(playerid, 536.875000, 352.333160,"Geld");
    PlayerTextDrawLetterSize(playerid, GeldDraw[playerid], 0.286249, 1.494999);
    PlayerTextDrawAlignment(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawColor(playerid, GeldDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, GeldDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, GeldDraw[playerid], 51);
    PlayerTextDrawFont(playerid, GeldDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, GeldDraw[playerid], 1);
    Anzeigen:
    new string[128];
    format(string,sizeof string,"Geld: %d",GetPlayerMoney(playerid));
    PlayerTextDrawSetString(playerid,GeldDraw[playerid],string);
    PlayerTextDrawShow(playerid,GeldDraw[playerid]);


    new string[128];
    format(string,sizeof string,"Level: %d",GetPlayerScore(playerid));
    PlayerTextDrawSetString(playerid,LevelDraw[playerid],string);
    PlayerTextDrawShow(playerid,LevelDraw[playerid]);


    Zur zweiten Frage:
    Nein, das ist nicht möglich. Du kannst nur auf gemappte Objekten etwas schreiben, aber nicht auf den Standart Objekten im Script. Du könntest sie neu einfügen, und sie dann beschriften, das würde gehen, aber ohne etwas dort zu mappen funktioniert nicht.

  • Nun siehts so aus ;(




    code:
    format(str1,sizeof(str1),"Name: %s",PlayerName(playerid));
    PlayerTextDrawSetString(playerid,NameDraw[playerid],str1);
    PlayerTextDrawShow(playerid,NameDraw[playerid]);
    NameDraw[playerid] = CreatePlayerTextDraw(playerid, 539.375000, 330.166625,"Name");
    PlayerTextDrawLetterSize(playerid, NameDraw[playerid], 0.259999, 1.588333);
    PlayerTextDrawAlignment(playerid, NameDraw[playerid], 1);
    PlayerTextDrawColor(playerid, NameDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, NameDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, NameDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, NameDraw[playerid], 51);
    PlayerTextDrawFont(playerid, NameDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, NameDraw[playerid], 1);

    format(str2,sizeof(str2),"Level: %i",GetPlayerScore(playerid));
    PlayerTextDrawSetString(playerid,LevelDraw[playerid],str2);
    PlayerTextDrawShow(playerid,LevelDraw[playerid]);
    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,"Level");
    PlayerTextDrawLetterSize(playerid, LevelDraw[playerid], 0.229999, 1.576666);
    PlayerTextDrawAlignment(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawColor(playerid, LevelDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, LevelDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LevelDraw[playerid], 51);
    PlayerTextDrawFont(playerid, LevelDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, LevelDraw[playerid], 1);


    format(str3,sizeof str3,"Geld: %d",GetPlayerMoney(playerid));
    PlayerTextDrawSetString(playerid,GeldDraw[playerid],str3);
    PlayerTextDrawShow(playerid,GeldDraw[playerid]);
    GeldDraw[playerid] = CreatePlayerTextDraw(playerid, 536.875000, 352.333160,"Geld");
    PlayerTextDrawLetterSize(playerid, GeldDraw[playerid], 0.286249, 1.494999);
    PlayerTextDrawAlignment(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawColor(playerid, GeldDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, GeldDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, GeldDraw[playerid], 51);
    PlayerTextDrawFont(playerid, GeldDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, GeldDraw[playerid], 1);

  • public OnPlayerConnect(playerid)
    {
    new str1[35],str2[50],str3[50];
    SetPlayerVirtualWorld(playerid,0);
    TextDrawShowForAll(Text:MauriceDRAW);
    TextDrawShowForAll(Text:RoleplayDRAW);
    TextDrawShowForAll(Text:Box1);
    TextDrawShowForAll(Text:Box2);
    TextDrawShowForAll(Text:Website);
    TextDrawShowForAll(Text:Uhrzeit);
    TextDrawShowForAll(Text:Since2013);

    format(str1,sizeof(str1),"Name: %s",PlayerName(playerid));
    PlayerTextDrawSetString(playerid,NameDraw[playerid],str1);
    PlayerTextDrawShow(playerid,NameDraw[playerid]);
    NameDraw[playerid] = CreatePlayerTextDraw(playerid, 539.375000, 330.166625,"Name");
    PlayerTextDrawLetterSize(playerid, NameDraw[playerid], 0.259999, 1.588333);
    PlayerTextDrawAlignment(playerid, NameDraw[playerid], 1);
    PlayerTextDrawColor(playerid, NameDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, NameDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, NameDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, NameDraw[playerid], 51);
    PlayerTextDrawFont(playerid, NameDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, NameDraw[playerid], 1);

    format(str2,sizeof(str2),"Level: %i",GetPlayerScore(playerid));
    PlayerTextDrawSetString(playerid,LevelDraw[playerid],str2);
    PlayerTextDrawShow(playerid,LevelDraw[playerid]);
    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,"Level");
    PlayerTextDrawLetterSize(playerid, LevelDraw[playerid], 0.229999, 1.576666);
    PlayerTextDrawAlignment(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawColor(playerid, LevelDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, LevelDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LevelDraw[playerid], 51);
    PlayerTextDrawFont(playerid, LevelDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, LevelDraw[playerid], 1);


    format(str3,sizeof str3,"Geld: %d",GetPlayerMoney(playerid));
    PlayerTextDrawSetString(playerid,GeldDraw[playerid],str3);
    PlayerTextDrawShow(playerid,GeldDraw[playerid]);
    GeldDraw[playerid] = CreatePlayerTextDraw(playerid, 536.875000, 352.333160,"Geld");
    PlayerTextDrawLetterSize(playerid, GeldDraw[playerid], 0.286249, 1.494999);
    PlayerTextDrawAlignment(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawColor(playerid, GeldDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, GeldDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, GeldDraw[playerid], 51);
    PlayerTextDrawFont(playerid, GeldDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, GeldDraw[playerid], 1);


    return 1;
    }

  • Soll das dein Ernst sein?
    Dein Vorposter gibt dir ne richtige Reihenfolge und du zeigst dem Player den Text und erstellt dann erst den Textdraw.

    PlayerTextDrawSetString(playerid,LevelDraw[playerid],str2);
    PlayerTextDrawShow(playerid,LevelDraw[playerid]);
    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,"Level");


    Problemlösung:
    Erst erstellen und dann erst anzeigen.

  • Okay nur jetzt ist es immer noch verbuggt aber ich sehe kein fefhler..



    public OnPlayerConnect(playerid)
    {
    new str1[35],str2[50],str3[50];
    TextDrawShowForAll(Text:MauriceDRAW);
    TextDrawShowForAll(Text:RoleplayDRAW);
    TextDrawShowForAll(Text:Box1);
    TextDrawShowForAll(Text:Box2);
    TextDrawShowForAll(Text:Website);
    TextDrawShowForAll(Text:Uhrzeit);
    TextDrawShowForAll(Text:Since2013);

    format(str1,sizeof(str1),"Name: %s",PlayerName(playerid));
    PlayerTextDrawSetString(playerid,NameDraw[playerid],str1);
    NameDraw[playerid] = CreatePlayerTextDraw(playerid, 539.375000, 330.166625,"Name");
    PlayerTextDrawLetterSize(playerid, NameDraw[playerid], 0.259999, 1.588333);
    PlayerTextDrawAlignment(playerid, NameDraw[playerid], 1);
    PlayerTextDrawColor(playerid, NameDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, NameDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, NameDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, NameDraw[playerid], 51);
    PlayerTextDrawFont(playerid, NameDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, NameDraw[playerid], 1);
    PlayerTextDrawShow(playerid,NameDraw[playerid]);

    format(str2,sizeof(str2),"Level: %i",GetPlayerScore(playerid));
    PlayerTextDrawSetString(playerid,LevelDraw[playerid],str2);
    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,"Level");
    PlayerTextDrawLetterSize(playerid, LevelDraw[playerid], 0.229999, 1.576666);
    PlayerTextDrawAlignment(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawColor(playerid, LevelDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, LevelDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LevelDraw[playerid], 51);
    PlayerTextDrawFont(playerid, LevelDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawShow(playerid,LevelDraw[playerid]);

    format(str3,sizeof str3,"Geld: %d",GetPlayerMoney(playerid));
    PlayerTextDrawSetString(playerid,GeldDraw[playerid],str3);
    GeldDraw[playerid] = CreatePlayerTextDraw(playerid, 536.875000, 352.333160,"Geld");
    PlayerTextDrawLetterSize(playerid, GeldDraw[playerid], 0.286249, 1.494999);
    PlayerTextDrawAlignment(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawColor(playerid, GeldDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, GeldDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, GeldDraw[playerid], 51);
    PlayerTextDrawFont(playerid, GeldDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawShow(playerid,GeldDraw[playerid]);
    return 1;
    }


  • format(str2,sizeof(str2),"Level: %i",GetPlayerScore(playerid));
    PlayerTextDrawSetString(playerid,LevelDraw[playerid],str2);
    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,"Level");



    format(str2,sizeof(str2),"Level: %i",GetPlayerScore(playerid));
    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,str2);

  • Okay hab mal alles gelöscht und neu gemacht soweit gut nur bei Geld und Score wird 0 angezeigt obwohl alles richtig ist.... format(str2,sizeof(str2),"Level: %i",GetPlayerScore(playerid));
    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,str2);
    PlayerTextDrawLetterSize(playerid, LevelDraw[playerid], 0.229999, 1.576666);
    PlayerTextDrawAlignment(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawColor(playerid, LevelDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, LevelDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LevelDraw[playerid], 51);
    PlayerTextDrawFont(playerid, LevelDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, LevelDraw[playerid], 1);


    format(str3,sizeof(str3),"Geld: %d",GetPlayerMoney(playerid));
    GeldDraw[playerid] = CreatePlayerTextDraw(playerid, 536.875000, 352.333160,str3);
    PlayerTextDrawLetterSize(playerid, GeldDraw[playerid], 0.286249, 1.494999);
    PlayerTextDrawAlignment(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawColor(playerid, GeldDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, GeldDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, GeldDraw[playerid], 51);
    PlayerTextDrawFont(playerid, GeldDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, GeldDraw[playerid], 1);

  • Letztes Problem für Heute :3 nun zeigt er garnix an... public TextDrawStats(playerid)
    {
    new str1[35],str2[50],str3[50];
    format(str1,sizeof(str1),"Name: %s",PlayerName(playerid));
    NameDraw[playerid] = CreatePlayerTextDraw(playerid, 539.375000, 330.166625,str1);
    PlayerTextDrawLetterSize(playerid, NameDraw[playerid], 0.259999, 1.588333);
    PlayerTextDrawAlignment(playerid, NameDraw[playerid], 1);
    PlayerTextDrawColor(playerid, NameDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, NameDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, NameDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, NameDraw[playerid], 51);
    PlayerTextDrawFont(playerid, NameDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, NameDraw[playerid], 1);


    format(str2,sizeof(str2),"Level: %i",GetPlayerScore(playerid));
    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,str2);
    PlayerTextDrawLetterSize(playerid, LevelDraw[playerid], 0.229999, 1.576666);
    PlayerTextDrawAlignment(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawColor(playerid, LevelDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, LevelDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LevelDraw[playerid], 51);
    PlayerTextDrawFont(playerid, LevelDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, LevelDraw[playerid], 1);


    format(str3,sizeof(str3),"Geld: %d",GetPlayerMoney(playerid));
    GeldDraw[playerid] = CreatePlayerTextDraw(playerid, 536.875000, 352.333160,str3);
    PlayerTextDrawLetterSize(playerid, GeldDraw[playerid], 0.286249, 1.494999);
    PlayerTextDrawAlignment(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawColor(playerid, GeldDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, GeldDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, GeldDraw[playerid], 51);
    PlayerTextDrawFont(playerid, GeldDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, GeldDraw[playerid], 1);
    return 1;
    }


    und hier der timer public OnPlayerConnect(playerid)
    {


    SetTimer("TextDrawStats",4000,1);


    PlayerTextDrawShow(playerid,NameDraw[playerid]);
    PlayerTextDrawShow(playerid,LevelDraw[playerid]);
    PlayerTextDrawShow(playerid,GeldDraw[playerid]);
    return 1;
    }

    Einmal editiert, zuletzt von Maurice. ()

  • So sollte das klappen:
    forward TextDrawStats(playerid);


    public OnPlayerConnect(playerid)
    {
    NameDraw[playerid] = CreatePlayerTextDraw(playerid, 539.375000, 330.166625,"Name");
    PlayerTextDrawLetterSize(playerid, NameDraw[playerid], 0.259999, 1.588333);
    PlayerTextDrawAlignment(playerid, NameDraw[playerid], 1);
    PlayerTextDrawColor(playerid, NameDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, NameDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, NameDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, NameDraw[playerid], 51);
    PlayerTextDrawFont(playerid, NameDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, NameDraw[playerid], 1);


    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,"Level");
    PlayerTextDrawLetterSize(playerid, LevelDraw[playerid], 0.229999, 1.576666);
    PlayerTextDrawAlignment(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawColor(playerid, LevelDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, LevelDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LevelDraw[playerid], 51);
    PlayerTextDrawFont(playerid, LevelDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, LevelDraw[playerid], 1);


    GeldDraw[playerid] = CreatePlayerTextDraw(playerid, 536.875000, 352.333160,"Geld");
    PlayerTextDrawLetterSize(playerid, GeldDraw[playerid], 0.286249, 1.494999);
    PlayerTextDrawAlignment(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawColor(playerid, GeldDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, GeldDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, GeldDraw[playerid], 51);
    PlayerTextDrawFont(playerid, GeldDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, GeldDraw[playerid], 1);
    SetTimerEx("TextDrawStats",2000,0,"d",playerid);
    return 1;
    }


    public TextDrawStats(playerid)
    {
    new string[128],string1[128],string2[128];
    format(string,sizeof(string),"Name: %s",PlayerName(playerid));
    PlayerTextDrawSetString(playerid,NameDraw[playerid],string);
    PlayerTextDrawShow(playerid,NameDraw[playerid]);
    format(string1,sizeof(string1),"Level: %d",GetPlayerScore(playerid));
    PlayerTextDrawSetString(playerid,LevelDraw[playerid],string);
    PlayerTextDrawShow(playerid,LevelDraw[playerid]);
    format(string2,sizeof(string2),"Geld: %d",GetPlayerMoney(playerid));
    PlayerTextDrawSetString(playerid,GeldDraw[playerid],string);
    PlayerTextDrawShow(playerid,GeldDraw[playerid]);
    return 1;
    }

  • public OnPlayerConnect(playerid)
    {



    NameDraw[playerid] = CreatePlayerTextDraw(playerid, 539.375000, 330.166625,"Name");
    PlayerTextDrawLetterSize(playerid, NameDraw[playerid], 0.259999, 1.588333);
    PlayerTextDrawAlignment(playerid, NameDraw[playerid], 1);
    PlayerTextDrawColor(playerid, NameDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, NameDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, NameDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, NameDraw[playerid], 51);
    PlayerTextDrawFont(playerid, NameDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, NameDraw[playerid], 1);


    LevelDraw[playerid] = CreatePlayerTextDraw(playerid, 538.750000, 341.833282,"Level");
    PlayerTextDrawLetterSize(playerid, LevelDraw[playerid], 0.229999, 1.576666);
    PlayerTextDrawAlignment(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawColor(playerid, LevelDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, LevelDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LevelDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LevelDraw[playerid], 51);
    PlayerTextDrawFont(playerid, LevelDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, LevelDraw[playerid], 1);


    GeldDraw[playerid] = CreatePlayerTextDraw(playerid, 536.875000, 352.333160,"Geld");
    PlayerTextDrawLetterSize(playerid, GeldDraw[playerid], 0.286249, 1.494999);
    PlayerTextDrawAlignment(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawColor(playerid, GeldDraw[playerid], -1);
    PlayerTextDrawSetShadow(playerid, GeldDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, GeldDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, GeldDraw[playerid], 51);
    PlayerTextDrawFont(playerid, GeldDraw[playerid], 2);
    PlayerTextDrawSetProportional(playerid, GeldDraw[playerid], 1);

    SetTimerEx("TextDrawStats",2000,0,"d",playerid);
    return 1;
    }


    über onplayerconnect public TextDrawStats(playerid)
    {
    new string[128],string1[128],string2[128];

    format(string,sizeof(string),"Name: %s",PlayerName(playerid));
    PlayerTextDrawSetString(playerid,NameDraw[playerid],string);
    PlayerTextDrawShow(playerid,NameDraw[playerid]);

    format(string1,sizeof(string1),"Level: %d",GetPlayerScore(playerid));
    PlayerTextDrawSetString(playerid,LevelDraw[playerid],string);
    PlayerTextDrawShow(playerid,LevelDraw[playerid]);

    format(string2,sizeof(string2),"Geld: %d",GetPlayerMoney(playerid));
    PlayerTextDrawSetString(playerid,GeldDraw[playerid],string);
    PlayerTextDrawShow(playerid,GeldDraw[playerid]);
    return 1;
    }