PayDay Textdraw

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
  • Manche PayDay Draws überspielen sich oder wenn ein anderer User auf den Server kommt überlappt sich das z.B PayDay: 6/60 und ein User kommt on steht über der 6/60 z.B 12/60


    Das würde nur passieren, wenn du das PlayerTextdraw für den gleichen Spieler mehrmals erstellen lässt, vielleicht hast du es in einer Schleife?
    Poste ggf. nochmal den Code, mit dem du das Textdraw erstellst.


  • Hier ist alles mit PayDay


    new PlayerText:Payday[MAX_PLAYERS];


    PlayerTextDrawSetString(playerid, Payday[playerid], "~r~PayDay: ~w~0~r~/~w~60");
    PlayerTextDrawShow(playerid,Payday[playerid]);


    PlayerTextDrawHide(playerid,Payday[playerid]);



    Payday[playerid] = CreatePlayerTextDraw(playerid, 8, 300, "~r~PayDay: ~w~%d~r~/~w~60");
    PlayerTextDrawFont(playerid, Payday[playerid], 1);
    PlayerTextDrawAlignment(playerid, Payday[playerid], 0);
    PlayerTextDrawLetterSize(playerid, Payday[playerid], 0.500000, 0.999990);
    PlayerTextDrawSetProportional(playerid, Payday[playerid], 1);
    PlayerTextDrawSetShadow(playerid, Payday[playerid], 1);
    PlayerTextDrawShow(playerid, Payday[playerid]);

    for(new i=0; i < MAX_PLAYERS; i++)
    {
    new string[68];
    format(string,sizeof(string),"~r~PayDay: ~w~%d~r~/~w~60",PlayerInfo[playerid][pPlayMinutes]);
    PlayerTextDrawSetString(i, Payday[i], string);
    }


    new str[64];
    format(str, sizeof(str), "~r~PayDay: ~w~%d~r~/~w~60", PlayerInfo[i][pPlayMinutes]);
    PlayerTextDrawSetString(i, Payday[i], str);


    PlayerInfo[i][pPlayMinutes] = 0;
    PlayerTextDrawSetString(i, Payday[i], "~r~PayDay: ~w~0~r~/~w~60");



    Das wars :D

    Mit freundlichen Grüßen,
    rndy

  • Payday[playerid] = CreatePlayerTextDraw(playerid, 8, 300, "~r~PayDay: ~w~%d~r~/~w~60");
    PlayerTextDrawFont(playerid, Payday[playerid], 1);
    PlayerTextDrawAlignment(playerid, Payday[playerid], 0);
    PlayerTextDrawLetterSize(playerid, Payday[playerid], 0.500000, 0.999990);
    PlayerTextDrawSetProportional(playerid, Payday[playerid], 1);
    PlayerTextDrawSetShadow(playerid, Payday[playerid], 1);
    PlayerTextDrawShow(playerid, Payday[playerid]);


    for(new i=0; i < MAX_PLAYERS; i++)
    {
    new string[68];
    format(string,sizeof(string),"~r~PayDay: ~w~%d~r~/~w~60",PlayerInfo[playerid][pPlayMinutes]);
    PlayerTextDrawSetString(i, Payday[i], string);
    }
    zu:
    Payday[playerid] = CreatePlayerTextDraw(playerid, 8, 300, "~r~PayDay: ~w~0~r~/~w~60");
    PlayerTextDrawFont(playerid, Payday[playerid], 1);
    PlayerTextDrawAlignment(playerid, Payday[playerid], 0);
    PlayerTextDrawLetterSize(playerid, Payday[playerid], 0.500000, 0.999990);
    PlayerTextDrawSetProportional(playerid, Payday[playerid], 1);
    PlayerTextDrawSetShadow(playerid, Payday[playerid], 1);
    PlayerTextDrawShow(playerid, Payday[playerid]);


    Die Schleife muss weg, und %d wird zu 0 beim Erstellen.


    Das hier kannst du ganz weg machen:
    PlayerTextDrawSetString(playerid, Payday[playerid], "~r~PayDay: ~w~0~r~/~w~60");
    PlayerTextDrawShow(playerid,Payday[playerid]);

  • ich schreibs nochmal:


    new PlayerText:Payday[MAX_PLAYERS]; //ganz oben


    //PlayerTextDrawSetString(playerid, Payday[playerid], "~r~PayDay: ~w~0~r~/~w~60");
    //PlayerTextDrawShow(playerid,Payday[playerid]); //war bei OnPlayerConnect sollt ich ja ausklammern


    PlayerTextDrawHide(playerid,Payday[playerid]); // OnPlayerDisconnect


    Payday[playerid] = CreatePlayerTextDraw(playerid, 8, 300, "~r~PayDay: ~w~%d~r~/~w~60");
    PlayerTextDrawFont(playerid, Payday[playerid], 1);
    PlayerTextDrawAlignment(playerid, Payday[playerid], 0);
    PlayerTextDrawLetterSize(playerid, Payday[playerid], 0.500000, 0.999990);
    PlayerTextDrawSetProportional(playerid, Payday[playerid], 1);
    PlayerTextDrawSetShadow(playerid, Payday[playerid], 1);
    PlayerTextDrawShow(playerid, Payday[playerid]);

    for(new i=0; i < MAX_PLAYERS; i++)
    {
    new string[68];
    format(string,sizeof(string),"~r~PayDay: ~w~%d~r~/~w~60",PlayerInfo[playerid][pPlayMinutes]);
    PlayerTextDrawSetString(i, Payday[i], string);
    } //OnPlayerSpawn


    if(PlayerInfo[i][pPlayMinutes] <= 60)
    {
    PlayerInfo[i][pPlayMinutes]++;


    new str[64];
    format(str, sizeof(str), "~r~PayDay: ~w~%d~r~/~w~60", PlayerInfo[i][pPlayMinutes]);
    PlayerTextDrawSetString(i, Payday[i], str);
    }
    if(PlayerInfo[i][pPlayMinutes] >= 60)
    {
    PlayerInfo[i][pPlayMinutes] = 0;
    PlayerTextDrawSetString(i, Payday[i], "~r~PayDay: ~w~0~r~/~w~60"); // unter Timer1


    Das wars.

    Mit freundlichen Grüßen,
    rndy

  • Den einen Teil den ich dir gesagt habe hast du ja nicht gemacht.


    Payday[playerid] = CreatePlayerTextDraw(playerid, 8, 300, "~r~PayDay: ~w~%d~r~/~w~60");
    PlayerTextDrawFont(playerid, Payday[playerid], 1);
    PlayerTextDrawAlignment(playerid, Payday[playerid], 0);
    PlayerTextDrawLetterSize(playerid, Payday[playerid], 0.500000, 0.999990);
    PlayerTextDrawSetProportional(playerid, Payday[playerid], 1);
    PlayerTextDrawSetShadow(playerid, Payday[playerid], 1);
    PlayerTextDrawShow(playerid, Payday[playerid]);


    for(new i=0; i < MAX_PLAYERS; i++)
    {
    new string[68];
    format(string,sizeof(string),"~r~PayDay: ~w~%d~r~/~w~60",PlayerInfo[playerid][pPlayMinutes]);
    PlayerTextDrawSetString(i, Payday[i], string);
    } //OnPlayerSpawn
    zu:
    Payday[playerid] = CreatePlayerTextDraw(playerid, 8, 300, "~r~PayDay: ~w~0~r~/~w~60");
    PlayerTextDrawFont(playerid, Payday[playerid], 1);
    PlayerTextDrawAlignment(playerid, Payday[playerid], 0);
    PlayerTextDrawLetterSize(playerid, Payday[playerid], 0.500000, 0.999990);
    PlayerTextDrawSetProportional(playerid, Payday[playerid], 1);
    PlayerTextDrawSetShadow(playerid, Payday[playerid], 1);
    PlayerTextDrawShow(playerid, Payday[playerid]);
    ^Das muss zu OnPlayerConnect und aus OnPlayerSpawn weg.
    Die Schleife muss ganz weg.



    Außerdem:
    PlayerTextDrawHide(playerid,Payday[playerid]); // OnPlayerDisconnect
    zu:
    PlayerTextDrawDestroy(playerid,Payday[playerid]); // OnPlayerDisconnect