SA-MP Forums Archive
Change color - 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: Change color (/showthread.php?tid=451818)



Change color - Nahin - 18.07.2013

First of all, yes I am a nab.

I want to change the color of the texts - "Weapon,Vehicle,Money,Fuel and Speed" from green to cyan. How can I do it?

Код:
PlayerTemp[playerid][Status] = TextDrawCreate(551.000000,389.000000,"~b~Weapon: ~w~Nigga~n~~b~Money: ~w~$1.234.56~n~~b~Vehicle: ~w~Sultan~n~~b~Fuel: ~w~50/100~n~~b~Speed: ~w~1000");
		TextDrawUseBox(PlayerTemp[playerid][Status],1);
		TextDrawBoxColor(PlayerTemp[playerid][Status],0x00000033);
		TextDrawTextSize(PlayerTemp[playerid][Status],750.000000,10.000000);
		TextDrawAlignment(PlayerTemp[playerid][Status],0);
		TextDrawBackgroundColor(PlayerTemp[playerid][Status],0x00000033);
		TextDrawFont(PlayerTemp[playerid][Status],1);
		TextDrawLetterSize(PlayerTemp[playerid][Status],0.199999,0.799999);
		TextDrawColor(PlayerTemp[playerid][Status],0xffffffff);
		TextDrawSetOutline(PlayerTemp[playerid][Status],1);
		TextDrawSetProportional(PlayerTemp[playerid][Status],1);
		TextDrawSetShadow(PlayerTemp[playerid][Status],3);



Re: Change color - Twizted - 18.07.2013

pawn Код:
PlayerTemp[playerid][Status] = TextDrawCreate(551.000000,389.000000,"~b~Weapon: ~w~Nigga~n~~b~Money: ~w~$1.234.56~n~~b~Vehicle: ~w~Sultan~n~~b~Fuel: ~w~50/100~n~~b~Speed: ~w~1000");
        TextDrawUseBox(PlayerTemp[playerid][Status],1);
        TextDrawBoxColor(PlayerTemp[playerid][Status],0x00000033); //box color
        TextDrawTextSize(PlayerTemp[playerid][Status],750.000000,10.000000);
        TextDrawAlignment(PlayerTemp[playerid][Status],0);
        TextDrawBackgroundColor(PlayerTemp[playerid][Status],0x00000033);//background color
        TextDrawFont(PlayerTemp[playerid][Status],1);
        TextDrawLetterSize(PlayerTemp[playerid][Status],0.199999,0.799999);
        TextDrawColor(PlayerTemp[playerid][Status],0x04B404ff);//text color
        TextDrawSetOutline(PlayerTemp[playerid][Status],1);//border color
        TextDrawSetProportional(PlayerTemp[playerid][Status],1);
        TextDrawSetShadow(PlayerTemp[playerid][Status],3);
I made it easier for you to read by adding some commentaries and changed what you requested to green.


Re: Change color - PrinceKumar - 18.07.2013

pawn Код:
TextDrawBoxColor(PlayerTemp[playerid][Status],0x99FFFFAA);
TextDrawBackgroundColor(PlayerTemp[playerid][Status],0x99FFFFAA);
replace these lines


Re: Change color - PrinceKumar - 18.07.2013

pawn Код:
TextDrawBoxColor(PlayerTemp[playerid][Status],0x99FFFFAA);
TextDrawBackgroundColor(PlayerTemp[playerid][Status],0x99FFFFAA);
replace these lines


Re: Change color - Nahin - 18.07.2013

Thank you very much Twizted,


Re: Change color - Nahin - 18.07.2013

btw, why are these color codes different than others?


Re: Change color - Twizted - 18.07.2013

Quote:
Originally Posted by Nahin
Посмотреть сообщение
Thank you very much Twizted,
Not a problem. If you have another issue with that, message me.