PHP код:
#include <a_samp>
new PlayerText: PTD_TextDraw[MAX_PLAYERS][3];
public OnFilterScriptInit()
{
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
PTD_TextDraw[playerid][0] = CreatePlayerTextDraw(playerid, 0.0, 0.0, "textdraw");
PlayerTextDrawLetterSize(playerid, PTD_TextDraw[playerid][0], 0.359238, 1.681666);
PlayerTextDrawAlignment(playerid,PTD_TextDraw[playerid][0], 2);
PlayerTextDrawColor(playerid, PTD_TextDraw[playerid][0], -1);
PlayerTextDrawSetShadow(0,PTD_TextDraw[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, PTD_TextDraw[playerid][0], 0);
PlayerTextDrawBackgroundColor(0,PTD_TextDraw[playerid][0], 255);
PlayerTextDrawFont(playerid, PTD_TextDraw[playerid][0], 2);
PlayerTextDrawSetProportional(playerid, PTD_TextDraw[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, PTD_TextDraw[playerid][0], 0);
PlayerTextDrawSetSelectable(playerid, PTD_TextDraw[playerid][0], false);
PlayerTextDrawShow(playerid, PTD_TextDraw[playerid][0]);
printf("Create[0]: %d", _:PTD_TextDraw[playerid][0]);
PTD_TextDraw[playerid][1] = CreatePlayerTextDraw(playerid, 0.0, 0.0, "textdraw");
PlayerTextDrawLetterSize(playerid, PTD_TextDraw[playerid][1], 0.359238, 1.681666);
PlayerTextDrawAlignment(0,PTD_TextDraw[playerid][1], 2);
PlayerTextDrawColor(playerid, PTD_TextDraw[playerid][1], -1);
PlayerTextDrawSetShadow(0,PTD_TextDraw[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, PTD_TextDraw[playerid][1], 0);
PlayerTextDrawBackgroundColor(0,PTD_TextDraw[playerid][1], 255);
PlayerTextDrawFont(playerid, PTD_TextDraw[playerid][1], 2);
PlayerTextDrawSetProportional(playerid, PTD_TextDraw[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, PTD_TextDraw[playerid][1], 0);
PlayerTextDrawSetSelectable(playerid, PTD_TextDraw[playerid][1], false);
PlayerTextDrawShow(playerid, PTD_TextDraw[playerid][1]);
printf("Create[1]: %d", _:PTD_TextDraw[playerid][1]);
PTD_TextDraw[playerid][2] = CreatePlayerTextDraw(playerid, 0.0, 0.0, "textdraw");
PlayerTextDrawLetterSize(playerid, PTD_TextDraw[playerid][2], 0.359238, 1.681666);
PlayerTextDrawAlignment(0,PTD_TextDraw[playerid][2], 2);
PlayerTextDrawColor(playerid, PTD_TextDraw[playerid][2], -1);
PlayerTextDrawSetShadow(0,PTD_TextDraw[playerid][2], 0);
PlayerTextDrawSetOutline(playerid, PTD_TextDraw[playerid][2], 0);
PlayerTextDrawBackgroundColor(0,PTD_TextDraw[playerid][2], 255);
PlayerTextDrawFont(playerid, PTD_TextDraw[playerid][2], 2);
PlayerTextDrawSetProportional(playerid, PTD_TextDraw[playerid][2], 1);
PlayerTextDrawSetShadow(playerid, PTD_TextDraw[playerid][2], 0);
PlayerTextDrawSetSelectable(playerid, PTD_TextDraw[playerid][2], false);
PlayerTextDrawShow(playerid, PTD_TextDraw[playerid][2]);
printf("Create[2]: %d", _:PTD_TextDraw[playerid][2]);
SetTimerEx("@timer", 2000, 0, "i", playerid);
return 1;
}
@timer(playerid);
@timer(playerid)
{
printf("Перед удалением[0]: %d", _:PTD_TextDraw[playerid][0]);
PlayerTextDrawDestroy(playerid, PTD_TextDraw[playerid][0]);
printf("Перед удалением[1]: %d", _:PTD_TextDraw[playerid][1]);
PlayerTextDrawDestroy(playerid, PTD_TextDraw[playerid][1]);
printf("Перед удалением[2]: %d", _:PTD_TextDraw[playerid][2]);
PlayerTextDrawDestroy(playerid, PTD_TextDraw[playerid][2]);
SetTimerEx("@timer2", 2000, 0, "i", playerid);
return 1;
}
@timer2(playerid);
@timer2(playerid)
{
printf("После: %d", _:PTD_TextDraw[playerid][0]);
printf("После: %d", _:PTD_TextDraw[playerid][1]);
printf("После: %d", _:PTD_TextDraw[playerid][2]);
return 1;
}