02.07.2012, 11:33
How to Hide all text draws in one line for one player?
HideAllTextDraws(playerid)
{
HideTextDrawForPlayer(playerid, TextDraw1);
HideTextDrawForPlayer(playerid, TextDraw2);
HideTextDrawForPlayer(playerid, TextDraw3);
}
public OnPlayerDeath(playerid) //Example callback
{
HideAllTextDraws(playerid);
return 1;
}
new Text:TDName[3];
public OnGameModeInit()
{
TDName[0] = TextDrawCreate(.............);
//etc.
TDName[1] = TextDrawCreate(.............);
//etc.
TDName[2] = TextDrawCreate(.............);
//etc.
return 1;
}
//Example:
public OnPlayerDeath(playerid)
{
HideAllTD(playerid);
return 1;
}
//Function:
HideAllTD(playerid)
{
for(new d = 0; d <= 3; d++)
{
TextDrawHideForPlayer(playerid, TDName[d]);
}
}