Textdraw help
#1

i add
Код:
static PlayerText:Textdraw1[MAX_PLAYERS][1];
( a little different )
and i add my textdraw to
stock Init_PText
Код:
{
Textdraw1[playerid][0] = CreatePlayerTextDraw(playerid,508.000000, 146.533325, "MAU CUA BAN");
	PlayerTextDrawLetterSize(playerid,Textdraw1[playerid][0], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid,Textdraw1[playerid][0], 1);
	PlayerTextDrawColor(playerid,Textdraw1[playerid][0], -1);
	PlayerTextDrawSetShadow(playerid,Textdraw1[playerid][0], 0);
	PlayerTextDrawSetOutline(playerid,Textdraw1[playerid][0], 1);
	PlayerTextDrawBackgroundColor(playerid,Textdraw1[playerid][0], 51);
	PlayerTextDrawFont(playerid,Textdraw1[playerid][0], 1);
	PlayerTextDrawSetProportional(playerid,Textdraw1[playerid][0], 1);

	return 1;
}
after that, i joined the game but textdraw don't show?, but i compiler success, please help me
Reply
#2

You dont add when you want to see this textdraw
Reply
#3

Use PlayerTextDrawShow(playerid, Textdraw1[playerid]); to display it.

Код:
new PlayerText:Textdraw1[MAX_PLAYERS];

public OnPlayerConnect(playerid) 
{

    Textdraw1[playerid] = CreatePlayerTextDraw(playerid,508.000000, 146.533325, "MAU CUA BAN");
    PlayerTextDrawLetterSize(playerid,Textdraw1[playerid], 0.449999, 1.600000);
    PlayerTextDrawAlignment(playerid,Textdraw1[playerid], 1);
    PlayerTextDrawColor(playerid,Textdraw1[playerid], -1);
    PlayerTextDrawSetShadow(playerid,Textdraw1[playerid], 0);
    PlayerTextDrawSetOutline(playerid,Textdraw1[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid,Textdraw1[playerid], 51);
    PlayerTextDrawFont(playerid,Textdraw1[playerid], 1);
    PlayerTextDrawSetProportional(playerid,Textdraw1[playerid], 1);
    return 1;
}

public OnPlayerSpawn(playerid) //The TextDraw will be show up when player spawn.
{
    PlayerTextDrawShow(playerid, Textdraw1[playerid]);
    return 1;
}
Reply
#4

your a the best, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)