10.11.2010, 23:33
pawn Код:
new Text:NameText[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
NameText[playerid] = TextDrawCreate(52.000000, 428.000000, " ");
TextDrawBackgroundColor(NameText[playerid], 255);
TextDrawFont(NameText[playerid], 1);
TextDrawLetterSize(NameText[playerid], 0.330000, 1.100000);
TextDrawColor(NameText[playerid], -1);
TextDrawSetOutline(NameText[playerid], 1);
TextDrawSetProportional(NameText[playerid], 1);
SetTimerEx("SetTextdraw", 2000, false, "i", playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
TextDrawDestroy(NameText[playerid]);
return 1;
}
forward SetTextdraw(playerid);
public SetTextdraw(playerid)
{
new name[25], string[25];
GetPlayerName(playerid, name, 25);
format(string, 25, "%s", name);
TextDrawSetString(NameText[playerid], string);
TextDrawShowForPlayer(playerid, NameText[playerid]);
return 1;
}