Order of TextDraws - weird behaviour - 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)
+--- Thread: Order of TextDraws - weird behaviour (
/showthread.php?tid=650864)
Order of TextDraws - weird behaviour -
Michalec - 08.03.2018
Hi.
I've noticed a weird problem on my server with order of my textdraws.
Today I've created a little script to test it on a clean server.
Here is the code of this script:
https://pastebin.com/auWGMxeS
In short:
Starting with /run command.
I'm creating 4 Textdraws with some text on each. Then showing these textdraws.
After that, I'm creating a textdraw to fulfill the screen on black.
This is what happens after running /run:
https://prnt.sc/iolb6f
Then I'm running /destroy (function hides and destroys all textdraws that I've created except one):
https://prnt.sc/iolbzr
As you can see - after removing some textdraws that are under my filled screen and that one that is over my blackfilled textdraw - the last one goes over this black textdraw.
Can someone explain me... what is going on?
Regards.
Re: Order of TextDraws - weird behaviour -
AndreiWow - 08.03.2018
You could just destroy all of them and show again only those two what you want to remain, if that's your issue?
Re: Order of TextDraws - weird behaviour -
Michalec - 08.03.2018
It's a dirty workaround.
I do not want to create textdraws everytime when I want to show them.
I think that this is a SA-MP bug (that probably won't be fixed)...
Order of textdraws should be in the same order we show textdraw, not create.
But as you can see - there is no order, they are fckd up
Edit: And no. I do not want to show only two. I want ALL of them to be behind this black screen.
This is nonsense, to hide every textdraw when I want to cover screen with a color (with different alpha or not)