Форум Pawn-Wiki.Ru - Воплоти мечту в реальность!: TextDraw не запускается во-второй раз. - Форум Pawn-Wiki.Ru - Воплоти мечту в реальность!

Перейти к содержимому

Страница 1 из 1
  • Вы не можете создать новую тему
  • Вы не можете ответить в тему

[ Pawn ]
TextDraw не запускается во-второй раз.

#1
Пользователь офлайн   droffet 

  • Прохожий
  • Вставить ник
  • Раскрыть информацию
При первом запуске все нормально прогружается, но после закрытия, при втором запуске - показывается на 0.1 секунды.


#include <a_samp>
#include <dc_cmd>
main(){}

const MAX_ITEMS_INVENTAR = 36;
const MAX_ITEMS_INVENTAR_PAGE = 12;

enum rtr {
	IdObjects,
	ObjectKolvoAll,
	Text3D:IdText3d,
	Float:X[MAX_OBJECTS], Float:Y[MAX_OBJECTS], Float:Z[MAX_OBJECTS],
	PlayerText:TDEditor_PTD[22],
	InventarObjectKolvoAll,
	InventarObjectIdAll[MAX_ITEMS_INVENTAR],
	bool:InventarStatus,
	order
}

new GL[MAX_PLAYERS][rtr];

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	switch(newkeys)
	{
	    case 131072: return Tumbler(playerid);
	}
	return 1;
}

public OnPlayerConnect(playerid)
{
	for(new i; i < MAX_ITEMS_INVENTAR; i++) GL[playerid][InventarObjectIdAll][i] = -1;
	return 1;
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(!(_:clickedid ^ 0xFFFF))
	{
        CancelSelectTextDraw(playerid), GL[playerid][InventarStatus] = false;
		for(new i; i < 22; i++) PlayerTextDrawDestroy(playerid, GL[playerid][TDEditor_PTD][i]);
	}
	return 1;
}

stock Tumbler(playerid)
{
	if(GL[playerid][InventarStatus] == false)
	{
	    GL[playerid][InventarStatus] = true, SelectTextDraw(playerid, 0xd52a00AA);
	    MainTD(playerid);
	    for(new i; i < 22; i++) PlayerTextDrawShow(playerid, GL[playerid][TDEditor_PTD][i]);
	}
	return 1;
}

stock MainTD(playerid)
{
    for(new i; i < 22; i++) PlayerTextDrawDestroy(playerid, GL[playerid][TDEditor_PTD][i]);
	new Float:ClearIdBox[MAX_ITEMS_INVENTAR_PAGE];
	for(new i; i < MAX_ITEMS_INVENTAR_PAGE; i++) ClearIdBox[i] = 100.0000;
	for(new i; i < GL[playerid][InventarObjectKolvoAll]; i++) if(GL[playerid][InventarObjectIdAll][i] != -1) ClearIdBox[i] = 1.0000;
	
 	GL[playerid][TDEditor_PTD][0] = CreatePlayerTextDraw(playerid, 366.2004, 133.9998, "LD_SPAC:white");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][0], 236.0000, 253.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][0], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][0], -2147483393);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][0], 255);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][0], 4);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][0], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][0], 0);

	GL[playerid][TDEditor_PTD][1] = CreatePlayerTextDraw(playerid, 375.2709, 141.5832, "INVENTORY");
	PlayerTextDrawLetterSize(playerid, GL[playerid][TDEditor_PTD][1], 0.4000, 1.6000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][1], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][1], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][1], 255);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][1], 1);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][1], 1);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][1], 0);

	GL[playerid][TDEditor_PTD][2] = CreatePlayerTextDraw(playerid, 366.2004, 164.9331, "LD_SPAC:white");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][2], 236.0000, 8.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][2], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][2], -1378294017);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][2], 255);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][2], 4);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][2], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][2], 0);

	GL[playerid][TDEditor_PTD][3] = CreatePlayerTextDraw(playerid, 368.6188, 180.5999, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][3], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][3], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][3], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][3], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][3], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][3], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][3], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][3], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][3], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][3], 0.0000, 0.0000, 0.0000, ClearIdBox[0]);

	GL[playerid][TDEditor_PTD][4] = CreatePlayerTextDraw(playerid, 425.3807, 180.6000, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][4], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][4], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][4], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][4], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][4], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][4], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][4], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][4], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][4], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][4], 0.0000, 0.0000, 0.0000, ClearIdBox[1]);

	GL[playerid][TDEditor_PTD][5] = CreatePlayerTextDraw(playerid, 487.4757, 181.4532, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][5], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][5], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][5], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][5], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][5], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][5], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][5], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][5], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][5], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][5], 0.0000, 0.0000, 0.0000, ClearIdBox[2]);

	GL[playerid][TDEditor_PTD][6] = CreatePlayerTextDraw(playerid, 544.6187, 181.4532, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][6], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][6], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][6], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][6], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][6], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][6], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][6], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][6], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][6], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][6], 0.0000, 0.0000, 0.0000, ClearIdBox[3]);

	GL[playerid][TDEditor_PTD][7] = CreatePlayerTextDraw(playerid, 368.6188, 235.6398, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][7], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][7], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][7], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][7], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][7], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][7], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][7], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][7], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][7], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][7], 0.0000, 0.0000, 0.0000, ClearIdBox[4]);

	GL[playerid][TDEditor_PTD][8] = CreatePlayerTextDraw(playerid, 425.3807, 235.2131, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][8], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][8], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][8], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][8], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][8], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][8], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][8], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][8], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][8], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][8], 0.0000, 0.0000, 0.0000, ClearIdBox[5]);

	GL[playerid][TDEditor_PTD][9] = CreatePlayerTextDraw(playerid, 487.4757, 235.6398, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][9], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][9], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][9], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][9], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][9], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][9], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][9], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][9], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][9], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][9], 0.0000, 0.0000, 0.0000, ClearIdBox[6]);

	GL[playerid][TDEditor_PTD][10] = CreatePlayerTextDraw(playerid, 366.2002, 357.8198, "LD_SPAC:white");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][10], 236.0000, 8.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][10], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][10], -1378294017);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][10], 255);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][10], 4);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][10], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][10], 0);

	GL[playerid][TDEditor_PTD][11] = CreatePlayerTextDraw(playerid, 443.0385, 351.5830, "LD_BEAT:circle");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][11], 19.0000, 21.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][11], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][11], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][11], 255);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][11], 4);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][11], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][11], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][11], true);

	GL[playerid][TDEditor_PTD][12] = CreatePlayerTextDraw(playerid, 471.6181, 348.0830, "LD_BEAT:circle");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][12], 26.0000, 28.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][12], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][12], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][12], 255);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][12], 4);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][12], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][12], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][12], true);

	GL[playerid][TDEditor_PTD][13] = CreatePlayerTextDraw(playerid, 450.2344, 355.6665, "1");
	PlayerTextDrawLetterSize(playerid, GL[playerid][TDEditor_PTD][13], 0.2987, 1.2029);
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][13], 455.0000, 0.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][13], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][13], -1);
	PlayerTextDrawUseBox(playerid, GL[playerid][TDEditor_PTD][13], 1);
	PlayerTextDrawBoxColor(playerid, GL[playerid][TDEditor_PTD][13], 0);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][13], -2147450625);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][13], 3);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][13], 1);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][13], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][13], true);

	GL[playerid][TDEditor_PTD][14] = CreatePlayerTextDraw(playerid, 505.3518, 350.9996, "LD_BEAT:circle");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][14], 19.0000, 21.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][14], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][14], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][14], 255);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][14], 4);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][14], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][14], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][14], true);

	GL[playerid][TDEditor_PTD][15] = CreatePlayerTextDraw(playerid, 482.0939, 355.6665, "2");
	PlayerTextDrawLetterSize(playerid, GL[playerid][TDEditor_PTD][15], 0.2987, 1.2029);
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][15], 487.0939, 0.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][15], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][15], -1);
	PlayerTextDrawUseBox(playerid, GL[playerid][TDEditor_PTD][15], 1);
	PlayerTextDrawBoxColor(playerid, GL[playerid][TDEditor_PTD][15], 0);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][15], 255);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][15], 3);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][15], 1);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][15], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][15], true);

	GL[playerid][TDEditor_PTD][16] = CreatePlayerTextDraw(playerid, 512.0797, 355.0833, "3");
	PlayerTextDrawLetterSize(playerid, GL[playerid][TDEditor_PTD][16], 0.2987, 1.2029);
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][16], 517.0797, 0.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][16], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][16], -1);
	PlayerTextDrawUseBox(playerid, GL[playerid][TDEditor_PTD][16], 1);
	PlayerTextDrawBoxColor(playerid, GL[playerid][TDEditor_PTD][16], 0);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][16], 255);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][16], 3);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][16], 1);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][16], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][16], true);

	GL[playerid][TDEditor_PTD][17] = CreatePlayerTextDraw(playerid, 544.6187, 235.6398, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][17], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][17], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][17], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][17], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][17], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][17], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][17], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][17], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][17], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][17], 0.0000, 0.0000, 0.0000, ClearIdBox[7]);

	GL[playerid][TDEditor_PTD][18] = CreatePlayerTextDraw(playerid, 368.6188, 290.2532, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][18], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][18], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][18], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][18], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][18], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][18], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][18], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][18], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][18], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][18], 0.0000, 0.0000, 0.0000, ClearIdBox[8]);

	GL[playerid][TDEditor_PTD][19] = CreatePlayerTextDraw(playerid, 425.3807, 290.2532, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][19], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][19], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][19], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][19], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][19], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][19], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][19], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][19], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][19], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][19], 0.0000, 0.0000, 0.0000, ClearIdBox[9]);

	GL[playerid][TDEditor_PTD][20] = CreatePlayerTextDraw(playerid, 487.4761, 290.2532, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][20], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][20], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][20], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][20], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][20], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][20], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][20], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][20], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][20], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][20], 0.0000, 0.0000, 0.0000, ClearIdBox[10]);

	GL[playerid][TDEditor_PTD][21] = CreatePlayerTextDraw(playerid, 544.2379, 290.2532, "");
	PlayerTextDrawTextSize(playerid, GL[playerid][TDEditor_PTD][21], 54.0000, 52.0000);
	PlayerTextDrawAlignment(playerid, GL[playerid][TDEditor_PTD][21], 1);
	PlayerTextDrawColor(playerid, GL[playerid][TDEditor_PTD][21], -1);
	PlayerTextDrawBackgroundColor(playerid, GL[playerid][TDEditor_PTD][21], 4587550);
	PlayerTextDrawFont(playerid, GL[playerid][TDEditor_PTD][21], 5);
	PlayerTextDrawSetProportional(playerid, GL[playerid][TDEditor_PTD][21], 0);
	PlayerTextDrawSetShadow(playerid, GL[playerid][TDEditor_PTD][21], 0);
	PlayerTextDrawSetSelectable(playerid, GL[playerid][TDEditor_PTD][21], true);
	PlayerTextDrawSetPreviewModel(playerid, GL[playerid][TDEditor_PTD][21], 1);
	PlayerTextDrawSetPreviewRot(playerid, GL[playerid][TDEditor_PTD][21], 0.0000, 0.0000, 0.0000, ClearIdBox[11]);
	return 1;
}

CMD:ttt(playerid)
{
	return Tumbler(playerid);
}

Сообщение отредактировал droffet: 23 июня 2022 - 11:38

0

#2
Пользователь офлайн   DeimoS 

  • Evil Scripter
  • Вставить ник
  • Раскрыть информацию
Во-первых, вызывая CancelSelectTextDraw, ты вызываешь OnPlayerClickTextDraw. С учётом того, что у тебя нет какой-то дополнительной проверки в OnPlayerClickTextDraw на то, показан ли текстдрав, а так же того, что CancelSelectTextDraw вызывается внутри OnPlayerClickTextDraw - вероятнее всего, ты получаешь рекурсию.

Во-вторых, тем, что ты не присваиваешь своим массивам, хранящим ID тексдравов, какое-либо невалидное значение при удалении текстдрава - ты рискуешь удалять совершенно рандомные текстдравы при повторном показе этих своих текстдравов.
0

#3
Пользователь офлайн   droffet 

  • Прохожий
  • Вставить ник
  • Раскрыть информацию

Просмотр сообщенияDeimoS (23 июня 2022 - 12:07) писал:

Нажмите сюда, чтобы прочитать это сообщение. [Показать]


Спасибо.
0

Поделиться темой:


Страница 1 из 1
  • Вы не можете создать новую тему
  • Вы не можете ответить в тему

1 человек читают эту тему
0 пользователей, 1 гостей, 0 скрытых пользователей


Яндекс.Метрика