11.07.2014, 19:34
Both. Use global textdraws, for textdraws, who never changes (like background of that box) and per player textdraws for textdraws, who looks different for every player.
p.s.
NEVER do things like
new Text:gTextDraw[MAX_PLAYERS];
If you need to use array (which size is MAX_PLAYERS) for global textdraws, you do it wrong.
your code should look something like that:
p.s.
NEVER do things like
new Text:gTextDraw[MAX_PLAYERS];
If you need to use array (which size is MAX_PLAYERS) for global textdraws, you do it wrong.
your code should look something like that:
PHP код:
new Text:td_HouseBackground;
new PlayerText:ptd_HousePrice[MAX_PLAYERS];
new PlayerText:ptd_HouseOwner[MAX_PLAYERS];
new PlayerText:ptd_HouseID[MAX_PLAYERS];
stock RandomFunction(playerid)
{
// ... random code
TextDrawShowForPlayer(playerid, td_HouseBackground);
PlayerTextDrawShow(playerid, ptd_HousePrice[playerid]);
PlayerTextDrawShow(playerid, ptd_HouseOwner[playerid]);
PlayerTextDrawShow(playerid, ptd_HouseID[playerid]);
// ... random code
}