SA-MP Forums Archive
Textdraw bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Textdraw bug (/showthread.php?tid=245510)



Textdraw bug - s1k - 31.03.2011

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.


Re: Textdraw bug - Davz*|*Criss - 31.03.2011

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



Re: Textdraw bug - s1k - 31.03.2011

yeah i know, read my post.


Re: Textdraw bug - Nexotronix - 31.03.2011

when you need to see this textdraw


Re: Textdraw bug - s1k - 31.03.2011

When I call a function it does ShowTextDrawForPlayer


Re: Textdraw bug - Donya - 06.04.2011

can you show how you made the textdraw?


Re: Textdraw bug - leong124 - 06.04.2011

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).