SA-MP Forums Archive
how important are textdaw tags? - 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: how important are textdaw tags? (/showthread.php?tid=364224)



how important are textdaw tags? - DeathTone - 30.07.2012

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)?


Re: how important are textdaw tags? - Kindred - 30.07.2012

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.


Re: how important are textdaw tags? - DeathTone - 30.07.2012

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];
?


Re: how important are textdaw tags? - Kindred - 30.07.2012

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.


Re: how important are textdaw tags? - DeathTone - 30.07.2012

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?


Re: how important are textdaw tags? - SuperViper - 30.07.2012

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.