PDA

View Full Version : Textdraws


Ananisiki
11/11/2013, 07:11 PM
^^^^^^^^

Konstantinos
11/11/2013, 07:22 PM
I'd use per-player textdraws for the statistics and muted/frozen/caged and global textdraw for the 'Welcome' one.

* Per-player textdraws use [MAX_PLAYERS], the global textdraws do not.

Ananisiki
11/11/2013, 08:05 PM
^^^^^^^^

Konstantinos
11/11/2013, 08:09 PM
Yes, but do not forget that per-player textdraws are created by CreatePlayerTextDraw (http://wiki.sa-mp.com/wiki/CreatePlayerTextDraw) and global textdraws are created by TextDrawCreate (http://wiki.sa-mp.com/wiki/TextDrawCreate).

Ananisiki
11/11/2013, 08:22 PM
^^^^^^^^

Konstantinos
11/11/2013, 08:29 PM
PlayerTextDrawShow(playerid, Textdraw0[playerid]);


You must declare them as:

new
PlayerText: Textdraw0[ MAX_PLAYERS ]
;


Goto: http://wiki.sa-mp.com/wiki/CreatePlayerTextDraw and scroll down. All of the functions about per-player textdraws exist at the bottom of the page.

dominik523
11/11/2013, 08:31 PM
create a textdraw for each player using foreach:

foreach(Player, i)
{
Textdraw0[i] = TextDrawCreate(490.000000, 404.000000, "Bla bla");
}
and somewhere else in the script you can do:

TextDrawShowForPlayer(Textdraw0[playerid]);
TextDrawHideForPlayer(Textdraw0[playerid]); // and so on

Ananisiki
11/11/2013, 08:50 PM
^^^^^^^^

Ananisiki
12/11/2013, 04:17 PM
^^^^^^^^