PlayerTextDraw bug (?)
#1

Hi'.
I've a problem. When I try the Wiki's code. Nothing happens:
pawn Код:
new PlayerText:Font[MAX_PLAYERS];

public OnFilterScriptExit()
{
    foreach(new i : Player)
        PlayerTextDrawDestroy(i, Font[i]);
    return 1;
}

CMD:testb(playerid)
{
    Font[playerid] = CreatePlayerTextDraw(playerid, 40.0, 140.0, "_~N~Example text!~N~_");
    PlayerTextDrawUseBox(playerid, Font[playerid], 1);
    PlayerTextDrawBoxColor(playerid, Font[playerid], 0x00000066); // Set the box color to a semi-transparent blac
    return 1;
}
Reply
#2

https://sampwiki.blast.hk/wiki/PlayerTextDrawShow
Reply
#3

Quote:

new PlayerText:Font[MAX_PLAYERS];

And this is wrong. No need to use array.

Correct :
Quote:

new PlayerText:Font;
Font = CreatePlayerTextDraw(playerid, 40.0, 140.0, "_~N~Example text!~N~_");

Reply
#4

That's because you didn't show the textdraw to specified player, use PlayerTextDrawShow.
Reply
#5

I'm so retarded those days... god.
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)