Confusion: TextDraw tags and MAX_PLAYERS
#8

MAX_PLAYERS is just a definition anyway. By doing
pawn Код:
new PlayerText:my_p_td[MAX_PLAYERS];
will tell your compiler to create "MAX_PLAYERS" amount of "my_p_td"s variables, hence also called an array.

If you don't use an array, but instead a single variable, it will look like this:
pawn Код:
// "playerid" equals 0
my_p_td = CreatePlayerTextDraw(playerid, 0.0, 0.0, "_");

// "playerid" equals 1 (overwrites last TD ID of player ID 0, bad!)
my_p_td = CreatePlayerTextDraw(playerid, 0.0, 0.0, "_");
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
"Creates a textdraw for a single player. This can be used as a way around the global text-draw limit."
Reply


Messages In This Thread
Confusion: TextDraw tags and MAX_PLAYERS - by ||123|| - 26.11.2013, 17:41
AW: Confusion: TextDraw tags and MAX_PLAYERS - by BigETI - 26.11.2013, 18:16
Re: Confusion: TextDraw tags and MAX_PLAYERS - by ||123|| - 26.11.2013, 18:49
Re: Confusion: TextDraw tags and MAX_PLAYERS - by Pottus - 26.11.2013, 18:55
Re: Confusion: TextDraw tags and MAX_PLAYERS - by iZN - 26.11.2013, 19:01
Re: Confusion: TextDraw tags and MAX_PLAYERS - by ||123|| - 26.11.2013, 19:03
Re: Confusion: TextDraw tags and MAX_PLAYERS - by ||123|| - 26.11.2013, 19:10
AW: Confusion: TextDraw tags and MAX_PLAYERS - by BigETI - 26.11.2013, 22:18
Re: Confusion: TextDraw tags and MAX_PLAYERS - by Vince - 26.11.2013, 23:33
AW: Confusion: TextDraw tags and MAX_PLAYERS - by BigETI - 27.11.2013, 00:10

Forum Jump:


Users browsing this thread: 1 Guest(s)