SA-MP Forums Archive
Textdraw colors changed by player dialog or command - 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: Textdraw colors changed by player dialog or command (/showthread.php?tid=631353)



Textdraw colors changed by player dialog or command - ElMaestro123 - 27.03.2017

Greetings, is there any possibility to change textdraw's color by entering a command.
For example, i made a textdraw and putted it in script and compiled it so, is there any function or something similar to do that after dialogresponse or command?
I would be very thankful for any helpful response.


Re: Textdraw colors changed by player dialog or command - Toroi - 27.03.2017

Yes, there are 3 functions to manage textdraw's colors.

https://sampwiki.blast.hk/wiki/TextDrawColor
https://sampwiki.blast.hk/wiki/TextDrawBackgroundColor
https://sampwiki.blast.hk/wiki/TextDrawBoxColor

You need to show the TextDraw again for the changes to be noticeable, though.

https://sampwiki.blast.hk/wiki/TextDrawShowForAll
or
https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer


Re: Textdraw colors changed by player dialog or command - ElMaestro123 - 27.03.2017

So basically i can make a textdraw with for example -1 color(white) and add it in script, and under for example
ondialogresponse I can add textdrawcolor function and it will work till relog(of course)?


Re: Textdraw colors changed by player dialog or command - Toroi - 27.03.2017

Basically, yes.

However, if you are using player textdraws you must use the equal of the functions that i listed in my first post

https://sampwiki.blast.hk/wiki/PlayerTextDrawColor
https://sampwiki.blast.hk/wiki/PlayerTextDrawBoxColor
https://sampwiki.blast.hk/wiki/PlayerTex...ackgroundColor

As I said before, after every change you must show the textdraw again

https://sampwiki.blast.hk/wiki/PlayerTextDrawShow


Re: Textdraw colors changed by player dialog or command - ElMaestro123 - 27.03.2017

Thanks bro! That helped me alot
i was thinking about creating the clone textdraw with different color, but this helped me out, which is way more simple
i will send u results when finished
probably for a few days