Player-textdraws
#1

Hello,

I was a bit confused with this and wanted to share this with you guys.

If you go to this wikipedia page:
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
- you will see that there is an example where player-textdraw's cells are defined with MAX_PLAYERS define.

1. example from the page (copied):
pawn Код:
new
        PlayerText:welcomeText[MAX_PLAYERS];

welcomeText[playerid] = CreatePlayerTextDraw(playerid, 240.0, 580.0, "Welcome to my SA-MP server");

PlayerTextDrawShow(playerid, welcomeText[playerid]);
Now, if you go to this wikipedia page:
https://sampwiki.blast.hk/wiki/PlayerTextDrawAlignment
- you will see that there is an example where player-textdraw's cells are NOT defined with MAX_PLAYERS define.

2. example from the page (copied):
pawn Код:
new
        PlayerText:MyTextdraw;

MyTextdraw = PlayerTextDrawCreate(320.0, 425.0, "This is an example textdraw");

PlayerTextDrawAlignment(playerid, MyTextdraw, 2);
In the first example, there are MAX_PLAYERS (let's say we have it defined as 500) player-textdraws created, while in the second example, there is only one player-textdraw created.
I believe that there was more than one person who wrote those examples on the SA:MP wikipedia page and because of that, we have a bit of confusion.
However, I've tried the second example, creating only one player-textdraw and I've tested it with 2 players on the server and it works fine for every player (the player-textdraw isn't changing for everyone the same like global one, every player sees his string in his player-textdraw), but I still want to share this with you guys and in good hope that wikipedia will be updated.

I apologize if a topic like this one already exists - I didn't find a topic like this one in this section.



Kind regards,
JohnN
Reply


Messages In This Thread
Player-textdraws - by JohnN - 22.04.2012, 13:53
Re: Player-textdraws - by SuperViper - 22.04.2012, 13:56
Re: Player-textdraws - by JohnN - 22.04.2012, 13:59
Re: Player-textdraws - by Jonny5 - 22.04.2012, 14:09
Re: Player-textdraws - by JohnN - 22.04.2012, 14:20
Re: Player-textdraws - by Jonny5 - 22.04.2012, 14:37
Re: Player-textdraws - by JohnN - 22.04.2012, 14:58
Re: Player-textdraws - by Jonny5 - 22.04.2012, 15:03
Re: Player-textdraws - by JohnN - 22.04.2012, 15:09
Re: Player-textdraws - by Jonny5 - 22.04.2012, 15:15

Forum Jump:


Users browsing this thread: 1 Guest(s)