pawn-lang / sa-mp-fixes

Includes and plugins to fix various issues in the SA:MP server that can be fixed externally, leaving the devs time for other things.
137 stars 57 forks source link

Textdraws are messed up when text is set #167

Closed r4sheed closed 2 years ago

r4sheed commented 2 years ago

kép

MVCE :

#include <fixes>
#include <a_samp>

#include <YSI_Coding\y_timers>

new Text:textdraw;

ptask __gameTextShow[1000](playerid)
{
    TextDrawSetString(textdraw, "test");
    TextDrawShowForPlayer(playerid, textdraw);
}

public OnFilterScriptInit()
{
    // Global style 13 (stunt).
    new Text:t = textdraw = TextDrawCreate(380.0, 341.15, " ");
    TextDrawLetterSize(t, 0.58, 2.42);
    TextDrawAlignment(t, 2);
    TextDrawColor(t, 0xDDDDDBFF);
    TextDrawSetShadow(t, 2);
    TextDrawSetOutline(t, 0);
    TextDrawBackgroundColor(t, 0x000000AA);
    TextDrawFont(t, 1);
    TextDrawSetProportional(t, true);
    TextDrawUseBox(t, true);
    TextDrawBoxColor(t, 0x00000000);
    TextDrawTextSize(t, 40.0, 460.0);
    return 1;
}

When fixes.inc removed it's working as it should.

Y-Less commented 2 years ago

Fixed. Thanks.