Frage zu TextdrawSetString

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


    habe mal eine frage, ich möchte das bei kontostand: der aktuelle kontostand von dem Spieler angezeigt wird, wie mache ich das ? habe da schon etwas gemacht aber klappt nicht ..


    OnGameModeInit:


    // Create the textdraws:
    Textdraw0 = TextDrawCreate(542.000000, 141.000000, "Info");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 2);
    TextDrawLetterSize(Textdraw0, 0.220000, 1.000000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 255);
    TextDrawTextSize(Textdraw0, 619.000000, 71.000000);


    new string[60],playerid;
    format(string, sizeof(string),"Kontostand: %d",GetPVarInt(playerid,"Kontostand"));
    Textdraw2 = TextDrawCreate(542.000000, 152.000000,string);
    TextDrawBackgroundColor(Textdraw2, 255);
    TextDrawFont(Textdraw2, 1);
    TextDrawLetterSize(Textdraw2, 0.160000, 1.099999);
    TextDrawColor(Textdraw2, -1);
    TextDrawSetOutline(Textdraw2, 1);
    TextDrawSetProportional(Textdraw2, 1);
    TextDrawUseBox(Textdraw2, 1);
    TextDrawBoxColor(Textdraw2, 255);
    TextDrawTextSize(Textdraw2, 619.000000, -2.000000);


    for(new i; i < MAX_PLAYERS; i ++)
    {
    if(IsPlayerConnected(i))
    {
    TextDrawShowForPlayer(i, Textdraw0);
    TextDrawShowForPlayer(i, Textdraw2);
    }
    }


  • Eigentlich braucht man gar keinen Timer.
    Wenn du serverseitiges Geld hast einfach immer die entsprechende Geldmenge im entsprechenden Stock abfragen und aufs Textdraw setzen.


    MFG

    Main: CPU: Intel Core i5-4440 @ 3,10 GHz | CPU-Cooling: Matterhorn -PURE- | RAM: 16GB Crucial Ballistix Sport DDR3-1600 DIMM CL9-9-9-24 |
    Motherboard: ASRock B85M Pro4 | GPU: Sapphire Radeon R9 390X Nitro 8GB GDDR5 |

    SSD: Samsung SSD 840 Evo 500GB | Power Supply: 550 Watt Corsair CS Series Modular 80+ Gold | Case: beQuiet! Silent Base 800


    As I walk through the valley of the shadow of death
    I take a look at my life and realize there's nothin' left.