how important are textdaw tags?
#1

I came across an issue where my textdraw id's where getting messed up and it was causing a bunch of problems, so recently I just started using Player Textdraws, I just had a question, whats the difference between:

pawn Код:
new PlayerText:Ok[MAX_PLAYERS];

Ok[playerid] = CreatePlayerTextDraw(playerid, 648.000000, 437.000000, "Box");

PlayerTextDrawShow(playerid, PlayerText:Ok[playerid]);
And:


pawn Код:
new PlayerText:Ok[MAX_PLAYERS];

Ok[playerid] = CreatePlayerTextDraw(playerid, 648.000000, 437.000000, "Box");

PlayerTextDrawShow(playerid, Ok[playerid]);
I'm getting really confused as if you HAVE TO include the "PlayerText:" tag everytime you gotta edit the textdraw, or does it even matter? And do you gotta also include the tag when you create the textdraw? Like:

pawn Код:
new PlayerText:Ok[MAX_PLAYERS];

PlayerText:Ok[playerid] = CreatePlayerTextDraw(playerid, 648.000000, 437.000000, "Box");
Will it fuck up everything if I don't include the "PlayerText:" tag on my player textdraws (when I edit them)?
Reply
#2

You do not need to include PlayerText in front of every single statement. (If correct) That simply states that the variable that is created will be used for a Player Textdraw.
Reply
#3

Quote:
Originally Posted by Kindred
Посмотреть сообщение
You do not need to include PlayerText in front of every single statement. (If correct) That simply states that the variable that is created will be used for a Player Textdraw.
Ok so the only thing I should use the "PlayerText" tag will be on

pawn Код:
new PlayerText:Ok[MAX_PLAYERS];
?
Reply
#4

Exactly. Same goes for things such as Floats, where you only use Float:variablename to define the float, and then use just variablename from then forward.

EDIT: Why are you using [MAX_PLAYERS] after the player textdraw? Seems rather useless, as you can have one player textdraw and then show/hide it to certain players.
Reply
#5

Quote:
Originally Posted by Kindred
Посмотреть сообщение
Exactly. Same goes for things such as Floats, where you only use Float:variablename to define the float, and then use just variablename from then forward.

EDIT: Why are you using [MAX_PLAYERS] after the player textdraw? Seems rather useless, as you can have one player textdraw and then show/hide it to certain players.
Wow, really?

So I can do

pawn Код:
new PlayerText:Speedometer;
And I can set the string for each playerid?
Reply
#6

It's a topic which has been discussed over and over again repeatedly but a while ago I think it was MP2 who confirmed that the variable needed to be a MAX_PLAYERS array.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)