09.01.2011, 08:39
You create the textdraws every time the player spawns. Create them OnPlayerConnect and destroy OnPlayerDisconnect.
pawn Код:
public OnPlayerConnect(playerid)
{
Textdraw0[playerid] = TextDrawCreate(504.000000,103.000000,"Level");
Textdraw1[playerid] = TextDrawCreate(505.000000,116.000000,"Xp:");
TextDrawAlignment(Textdraw0[playerid],0);
TextDrawAlignment(Textdraw1[playerid],0);
TextDrawBackgroundColor(Textdraw0[playerid],0x000000ff);
TextDrawBackgroundColor(Textdraw1[playerid],0x000000ff);
TextDrawFont(Textdraw0[playerid],1);
TextDrawLetterSize(Textdraw0[playerid],0.299999,1.000000);
TextDrawFont(Textdraw1[playerid],1);
TextDrawLetterSize(Textdraw1[playerid],0.299999,0.899999);
TextDrawColor(Textdraw0[playerid],0xffffffff);
TextDrawColor(Textdraw1[playerid],0xffffffff);
TextDrawSetOutline(Textdraw0[playerid],1);
TextDrawSetOutline(Textdraw1[playerid],1);
TextDrawSetProportional(Textdraw0[playerid],1);
TextDrawSetProportional(Textdraw1[playerid],1);
TextDrawSetShadow(Textdraw0[playerid],1);
TextDrawSetShadow(Textdraw1[playerid],1);
TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
TextDrawDestroy(Textdraw0[playerid]);
TextDrawDestroy(Textdraw1[playerid]);
}