White spaces in textdraw -
AidanRO - 28.03.2018
Hey, I'm trying to use ~n~ in my textdraw, but apparently, after it is added into the textdraw string, a little malfunction seems to appear (you can see in the photo below). Any ideas?
Textdraw code:
pawn Код:
td_radio_info2[ playerid ] = CreatePlayerTextDraw( playerid, 549.923486, 106.850000, "~b~radio info~n~chan: ~g~0~n~~b~slot: ~g~0" ) ; // NON-COLOR
PlayerTextDrawLetterSize( playerid, td_radio_info2[ playerid ], 0.484498, 1.113124 ) ;
PlayerTextDrawAlignment( playerid, td_radio_info2[ playerid ], 2 ) ;
PlayerTextDrawColor( playerid, td_radio_info2[ playerid ], 255 ) ;
PlayerTextDrawSetShadow( playerid, td_radio_info2[ playerid ], 0 ) ;
PlayerTextDrawSetOutline( playerid, td_radio_info2[ playerid ], 0 ) ;
PlayerTextDrawBackgroundColor( playerid, td_radio_info2[ playerid ], 51 ) ;
PlayerTextDrawFont( playerid, td_radio_info2[ playerid ], 3 ) ;
PlayerTextDrawSetProportional( playerid, td_radio_info2[ playerid ], 1 ) ;
td_radio_info1[ playerid ] = CreatePlayerTextDraw( playerid, 548.000000, 105.000000, "radio info~n~chan: 0~n~slot: 0" ) ; // COLOR
PlayerTextDrawLetterSize( playerid, td_radio_info1[ playerid ], 0.474998, 1.104373 ) ;
PlayerTextDrawAlignment( playerid, td_radio_info1[ playerid ], 2 ) ;
PlayerTextDrawColor( playerid, td_radio_info1[ playerid ], -1 ) ;
PlayerTextDrawSetShadow( playerid, td_radio_info1[ playerid ], 0 ) ;
PlayerTextDrawSetOutline( playerid, td_radio_info1[ playerid ], 0 ) ;
PlayerTextDrawBackgroundColor( playerid, td_radio_info1[ playerid ], 51 ) ;
PlayerTextDrawFont( playerid, td_radio_info1[ playerid ], 3 ) ;
PlayerTextDrawSetProportional( playerid, td_radio_info1[ playerid ], 1 ) ;
Re: White spaces in textdraw -
ForCop - 28.03.2018
Quote:
Originally Posted by AidanRO
Hey, I'm trying to use ~n~ in my textdraw, but apparently, after it is added into the textdraw string, a little malfunction seems to appear (you can see in the photo below). Any ideas?
Textdraw code:
pawn Код:
td_radio_info2[ playerid ] = CreatePlayerTextDraw( playerid, 549.923486, 106.850000, "~b~radio info~n~chan: ~g~0~n~~b~slot: ~g~0" ) ; // NON-COLOR PlayerTextDrawLetterSize( playerid, td_radio_info2[ playerid ], 0.484498, 1.113124 ) ; PlayerTextDrawAlignment( playerid, td_radio_info2[ playerid ], 2 ) ; PlayerTextDrawColor( playerid, td_radio_info2[ playerid ], 255 ) ; PlayerTextDrawSetShadow( playerid, td_radio_info2[ playerid ], 0 ) ; PlayerTextDrawSetOutline( playerid, td_radio_info2[ playerid ], 0 ) ; PlayerTextDrawBackgroundColor( playerid, td_radio_info2[ playerid ], 51 ) ; PlayerTextDrawFont( playerid, td_radio_info2[ playerid ], 3 ) ; PlayerTextDrawSetProportional( playerid, td_radio_info2[ playerid ], 1 ) ;
td_radio_info1[ playerid ] = CreatePlayerTextDraw( playerid, 548.000000, 105.000000, "radio info~n~chan: 0~n~slot: 0" ) ; // COLOR PlayerTextDrawLetterSize( playerid, td_radio_info1[ playerid ], 0.474998, 1.104373 ) ; PlayerTextDrawAlignment( playerid, td_radio_info1[ playerid ], 2 ) ; PlayerTextDrawColor( playerid, td_radio_info1[ playerid ], -1 ) ; PlayerTextDrawSetShadow( playerid, td_radio_info1[ playerid ], 0 ) ; PlayerTextDrawSetOutline( playerid, td_radio_info1[ playerid ], 0 ) ; PlayerTextDrawBackgroundColor( playerid, td_radio_info1[ playerid ], 51 ) ; PlayerTextDrawFont( playerid, td_radio_info1[ playerid ], 3 ) ; PlayerTextDrawSetProportional( playerid, td_radio_info1[ playerid ], 1 ) ;
|
white line?
Re: White spaces in textdraw -
X337 - 28.03.2018
change the textdraw background color to transparent color
Код:
PlayerTextDrawBackgroundColor( playerid, td_radio_info2[ playerid ], 0x00000000 ) ;
also do that for td_radio_info1[ playerid ]
Re: White spaces in textdraw -
AidanRO - 28.03.2018
It didn't work. Look at the photo and you'll see the white squares and you'll know what I'm talking about.
Re: White spaces in textdraw -
ForCop - 28.03.2018
Quote:
Originally Posted by AidanRO
It didn't work. Look at the photo and you'll see the white squares and you'll know what I'm talking about.
|
maybe it's from the speedometer?
Re: White spaces in textdraw -
AidanRO - 28.03.2018
Quote:
Originally Posted by ForCop
maybe it's from the speedometer?
|
It doesn't have any connection to the speedometer. I show it or not, the white squares still appear because of the ~n~'s.
Re: White spaces in textdraw -
ForCop - 28.03.2018
Quote:
Originally Posted by AidanRO
It doesn't have any connection to the speedometer. I show it or not, the white squares still appear because of the ~n~'s.
|
PlayerTextDrawColor( playerid, td_radio_info1[ playerid ], -1 ) ;
PlayerTextDrawBackgroundColor( playerid, td_radio_info1[ playerid ], 51 ) ;
try without these functions ... something else I do not know.
Re: White spaces in textdraw -
AidanRO - 28.03.2018
Still no result.
Re: White spaces in textdraw -
NaS - 28.03.2018
These glitches mostly appear when there are either unsupported signs/unmatched codes (eg. "~r") in the Text or if there's a space (or underscore) at the very end. This can also happen with one of the Fonts if the String is completely empty).
For testing you could print the TextDraw String to the console to see the actual signs (since textdraws do not show all characters correctly).
If you are unsure show us the plain text of the TextDraw here.
Re: White spaces in textdraw -
AidanRO - 28.03.2018
The printed string of the textdraw after adding the ~n~'s:
Код:
info_td_msg1[ 0 ]: ~N~~N~~N~~b~radio info~n~chan: ~g~0~n~~b~slot: ~g~0