PDA

View Full Version : Textdraw colors changed by player dialog or command


ElMaestro123
27/03/2017, 06:19 PM
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. :)

Toroi
27/03/2017, 06:20 PM
Yes, there are 3 functions to manage textdraw's colors.

http://wiki.sa-mp.com/wiki/TextDrawColor
http://wiki.sa-mp.com/wiki/TextDrawBackgroundColor
http://wiki.sa-mp.com/wiki/TextDrawBoxColor

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

http://wiki.sa-mp.com/wiki/TextDrawShowForAll
or
http://wiki.sa-mp.com/wiki/TextDrawShowForPlayer

ElMaestro123
27/03/2017, 06:23 PM
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)?

Toroi
27/03/2017, 06:28 PM
Basically, yes.

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

http://wiki.sa-mp.com/wiki/PlayerTextDrawColor
http://wiki.sa-mp.com/wiki/PlayerTextDrawBoxColor
http://wiki.sa-mp.com/wiki/PlayerTextDrawBackgroundColor

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

http://wiki.sa-mp.com/wiki/PlayerTextDrawShow

ElMaestro123
27/03/2017, 06:30 PM
Thanks bro! That helped me alot :D
i was thinking about creating the clone textdraw with different color, but this helped me out, which is way more simple :D
i will send u results when finished :D
probably for a few days :D