The problem with TextDraw`s
#1

Hello all. Sorry for my bad english. But i'll try to speak it.

There was a problem...
Created TextDraw (box) of the following form:
Код:
        Textdraw[0] = TextDrawCreate(166.000000, 108.526634, "usebox");
	TextDrawFont(Textdraw[0], TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawLetterSize(Textdraw[0], 0.000000, 10.689743);
	TextDrawTextSize(Textdraw[0], 70.000000, 0.000000);
	TextDrawAlignment(Textdraw[0], 1);
	TextDrawColor(Textdraw[0], 0);
	TextDrawUseBox(Textdraw[0], true);
	TextDrawBoxColor(Textdraw[0], -3394765);
	TextDrawSetSelectable(Textdraw[0], true);
Next, I show it to the player in such a way:
Код:
CMD:test(playerid, params[])
{
    TextDrawSetPreviewModel(Textdraw[0], 411);
    TextDrawSetPreviewRot(Textdraw[0], -16.0, 0.0, -55.0, 1);
    TextDrawShowForPlayer(playerid, Textdraw[0]);
    SelectTextDraw(playerid, 0xFFFF00AA);
    return true;
}
But the fact is that as soon as TextDraw displayed, it immediately disappears. What could be the problem? (TextDrawHideForPlayer in vogue at all no)
(Clickable TextDraw with a picture Infernus )
Reply
#2

The problem is not solved
What could be wrong?
Reply
#3

try this:
pawn Код:
CMD:test(playerid, params[])
{
    TextDrawSetPreviewModel(Textdraw[0], 411);
    TextDrawSetPreviewRot(Textdraw[0], -16.0, 0.0, -55.0, 1);
    TextDrawShowForPlayer(playerid, Textdraw[0]);
    return 1;
}
I deleted the
SelectTextDraw(playerid, 0xFFFF00AA);
I want to see if it will appear or not
Reply
#4

Quote:
Originally Posted by Eth
Посмотреть сообщение
try this:
pawn Код:
CMD:test(playerid, params[])
{
    TextDrawSetPreviewModel(Textdraw[0], 411);
    TextDrawSetPreviewRot(Textdraw[0], -16.0, 0.0, -55.0, 1);
    TextDrawShowForPlayer(playerid, Textdraw[0]);
    return 1;
}
I deleted the
SelectTextDraw(playerid, 0xFFFF00AA);
I want to see if it will appear or not
Anyway TextDraw disappears
If want - I will record the video as everything happens
Reply
#5

Functions TextDrawHideForAll and TextDrawHideForPlayer - Not Used
Reply
#6

The problem was in string:
Код:
TextDrawTextSize(Textdraw[0], 70.000000, 0.000000);
Namely, the third argument:
Код:
0.000000
But now there's a new question ()
How to choose a value for 0.000000, as was done in iTD iPleomax?
Reply
#7

Код:
TextDrawTextSize(Text:text, Float:x, Float:y)
text	The TextDraw to set the size of.
x	The size on the X axis (left/right) following the same 640x480 grid as TextDrawCreate.
y	The size on the Y axis (up/down) following the same 640x480 grid as TextDrawCreate.
Try
Код:
TextDrawTextSize(Textdraw[0], 70.000000, 10.000000);
Reply
#8

Quote:
Originally Posted by rodrijose2009
Посмотреть сообщение
Код:
TextDrawTextSize(Text:text, Float:x, Float:y)
text	The TextDraw to set the size of.
x	The size on the X axis (left/right) following the same 640x480 grid as TextDrawCreate.
y	The size on the Y axis (up/down) following the same 640x480 grid as TextDrawCreate.
Try
Код:
TextDrawTextSize(Textdraw[0], 70.000000, 10.000000);
The fact that sizes, that were made in iTD, doesn't match with sizes, that iTD puts in code TextDraw.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)