Textdraw bug
#1

I have a textdraw that shows when it is not supposed to (usually when I spawn or something: it doesn't get shown OnPlayerSpawn, only Hide).

For debuging I made a /txthide command to hide the textdraw. It doesnt gi away after I do that.

When the textdraw is SUPPOSED to be called and it is shown, it is kind of like an overlay. The one that is supposed to be shown is place on top of the one which is not.

Can someone tell me why this is showing randomly and why It wont dissapear when I TextDrawHideForPlayer? Thanks.
Reply
#2

pawn Code:
CMD:txthide(playerid, params[])
{
       TextDrawHideForPlayer(playerid, TextDraw0); //Change TextDraw0 to your textdraw.
       return 1;
}
Reply
#3

yeah i know, read my post.
Reply
#4

when you need to see this textdraw
Reply
#5

When I call a function it does ShowTextDrawForPlayer
Reply
#6

can you show how you made the textdraw?
Reply
#7

Initialise your variable first.
pawn Code:
new Text:yourtextdraw = Text:INVALID_TEXT_DRAW;

public OnGameModeInit()
{
    yourtextdraw = TextDrawCreate(...);
    //Some more
    return 1;
}
I got weird things when the variable is not initialised.
You'd better set the variable to Text:INVALID_TEXT_DRAW again after deleting it(especially when you will recreate it).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)