22.04.2012, 13:53
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):
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):
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
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]);
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);
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