Question

Помогите.. при удалении тектсдрава инфернус пропадает.. Пытался переделывать текстдрав.. но эта дрянь все равно вылезает..
 

Спойлер

gxG7R1X.jpg

Спойлер

    speedoo_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 573.3330, 306.9778, "Box"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][0], 0.0000, 5.1666);
    PlayerTextDrawTextSize(playerid, speedoo_PTD[playerid][0], 636.0000, 0.0000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][0], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][0], -1);
    PlayerTextDrawUseBox(playerid, speedoo_PTD[playerid][0], 1);
    PlayerTextDrawBoxColor(playerid, speedoo_PTD[playerid][0], 80);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][0], 255);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][0], 1);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][0], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][0], 0);

    speedoo_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 576.3331, 310.2961, "Box"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][1], 0.0000, 4.4333);
    PlayerTextDrawTextSize(playerid, speedoo_PTD[playerid][1], 634.0000, 0.0000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][1], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][1], -1);
    PlayerTextDrawUseBox(playerid, speedoo_PTD[playerid][1], 1);
    PlayerTextDrawBoxColor(playerid, speedoo_PTD[playerid][1], 106);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][1], 255);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][1], 1);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][1], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][1], 0);

    speedoo_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 579.6667, 357.1703, "~g~ENGINE"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][2], 0.3680, 1.9650);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][2], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][2], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][2], 121);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][2], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][2], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][2], 1);

    speedoo_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 585.0000, 329.3778, "km/h"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][3], 0.4000, 1.6000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][3], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][3], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][3], 255);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][3], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][3], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][3], 1);

    speedoo_PTD[playerid][4] = CreatePlayerTextDraw(playerid, 605.6662, 310.2963, "999"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][4], 0.4366, 2.4545);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][4], 2);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][4], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][4], 115);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][4], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][4], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][4], 1);

    speedoo_PTD[playerid][5] = CreatePlayerTextDraw(playerid, 573.3338, 358.8299, "Box"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][5], 0.0000, 5.2333);
    PlayerTextDrawTextSize(playerid, speedoo_PTD[playerid][5], 636.0000, 0.0000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][5], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][5], -256);
    PlayerTextDrawUseBox(playerid, speedoo_PTD[playerid][5], 1);
    PlayerTextDrawBoxColor(playerid, speedoo_PTD[playerid][5], 88);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][5], 51);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][5], 1);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][5], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][5], 0);

    speedoo_PTD[playerid][6] = CreatePlayerTextDraw(playerid, 579.6667, 370.8591, "~g~LOCKED"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][6], 0.3493, 1.9650);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][6], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][6], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][6], 121);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][6], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][6], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][6], 1);

    speedoo_PTD[playerid][7] = CreatePlayerTextDraw(playerid, 591.3331, 388.2815, "999L"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][7], 0.2109, 1.4631);
    PlayerTextDrawTextSize(playerid, speedoo_PTD[playerid][7], 0.0000, 1.0000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][7], 2);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][7], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][7], 80);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][7], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][7], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][7], 1);

    speedoo_PTD[playerid][8] = CreatePlayerTextDraw(playerid, 610.9995, 386.6224, "100%"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][8], 0.2286, 1.6746);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][8], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][8], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][8], 80);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][8], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][8], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][8], 1);

---- 
код в OnPlayerStateChange

if(newstate == PLAYER_STATE_DRIVER)
	{
		if(!IsAPlane(tacha) && !IsABoat(tacha) && !IsANoSpeed(tacha) && !BezBenzacar(tacha))
        {
			if(PlayerInfo[playerid][pArmorCar] > 0)
			{
			   if(tacha == caridhouse[playerid])
			   {
				   SetVehicleHealth(tacha, 10000.0);
				   SCM(playerid, -1, "У вас +10.000 HP к домашнему транспорту");
			   }
			}
  		for(new i;i!=5;i++)
		{
			PlayerTextDrawShow(playerid, speedoo_PTD[i][playerid]);
		}
			STimer[playerid] = SetTimerEx("UpdateSpeedometer", 120, true, "d", playerid);

		}
	}

 

 

Edited by FakeNan
Причина: добавил код в OnPlayerStateChange

Share this post


Link to post

9 answers to this question

  • 0

Нашел ошибку. Местами перепутано [playerid] и номер тд.

Share this post


Link to post
  • 0

Покажи, что удаляешь, код скинь

Share this post


Link to post
  • 0
48 минут назад, SCRIPTMAN сказал:

Покажи, что удаляешь, код скинь

весь код.. 🤡

Share this post


Link to post
  • 0

Тебя попросили скинуть код, ты кидаешь какую-то дичь. Допустим. Ищи где-то box не удаляется, скинь код команды и код текстдрава.

Share this post


Link to post
  • 0
В 25.12.2019 в 12:16, keyl1337 сказал:

Тебя попросили скинуть код, ты кидаешь какую-то дичь. Допустим. Ищи где-то box не удаляется, скинь код команды и код текстдрава.

Текстдрав:
 

Спойлер

speedoo_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 573.3330, 306.9778, "Box"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][0], 0.0000, 5.1666);
    PlayerTextDrawTextSize(playerid, speedoo_PTD[playerid][0], 636.0000, 0.0000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][0], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][0], -1);
    PlayerTextDrawUseBox(playerid, speedoo_PTD[playerid][0], 1);
    PlayerTextDrawBoxColor(playerid, speedoo_PTD[playerid][0], 80);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][0], 255);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][0], 1);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][0], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][0], 0);

    speedoo_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 576.3331, 310.2961, "Box"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][1], 0.0000, 4.4333);
    PlayerTextDrawTextSize(playerid, speedoo_PTD[playerid][1], 634.0000, 0.0000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][1], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][1], -1);
    PlayerTextDrawUseBox(playerid, speedoo_PTD[playerid][1], 1);
    PlayerTextDrawBoxColor(playerid, speedoo_PTD[playerid][1], 106);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][1], 255);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][1], 1);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][1], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][1], 0);

    speedoo_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 579.6667, 357.1703, "~g~ENGINE"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][2], 0.3680, 1.9650);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][2], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][2], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][2], 121);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][2], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][2], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][2], 1);

    speedoo_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 585.0000, 329.3778, "km/h"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][3], 0.4000, 1.6000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][3], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][3], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][3], 255);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][3], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][3], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][3], 1);

    speedoo_PTD[playerid][4] = CreatePlayerTextDraw(playerid, 605.6662, 310.2963, "999"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][4], 0.4366, 2.4545);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][4], 2);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][4], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][4], 115);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][4], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][4], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][4], 1);

    speedoo_PTD[playerid][5] = CreatePlayerTextDraw(playerid, 573.3338, 358.8299, "Box"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][5], 0.0000, 5.2333);
    PlayerTextDrawTextSize(playerid, speedoo_PTD[playerid][5], 636.0000, 0.0000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][5], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][5], -256);
    PlayerTextDrawUseBox(playerid, speedoo_PTD[playerid][5], 1);
    PlayerTextDrawBoxColor(playerid, speedoo_PTD[playerid][5], 88);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][5], 51);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][5], 1);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][5], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][5], 0);

    speedoo_PTD[playerid][6] = CreatePlayerTextDraw(playerid, 579.6667, 370.8591, "~g~LOCKED"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][6], 0.3493, 1.9650);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][6], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][6], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][6], 121);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][6], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][6], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][6], 1);

    speedoo_PTD[playerid][7] = CreatePlayerTextDraw(playerid, 591.3331, 388.2815, "999L"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][7], 0.2109, 1.4631);
    PlayerTextDrawTextSize(playerid, speedoo_PTD[playerid][7], 0.0000, 1.0000);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][7], 2);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][7], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][7], 80);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][7], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][7], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][7], 1);

    speedoo_PTD[playerid][8] = CreatePlayerTextDraw(playerid, 610.9995, 386.6224, "100%"); // ?????
    PlayerTextDrawLetterSize(playerid, speedoo_PTD[playerid][8], 0.2286, 1.6746);
    PlayerTextDrawAlignment(playerid, speedoo_PTD[playerid][8], 1);
    PlayerTextDrawColor(playerid, speedoo_PTD[playerid][8], -1);
    PlayerTextDrawBackgroundColor(playerid, speedoo_PTD[playerid][8], 80);
    PlayerTextDrawFont(playerid, speedoo_PTD[playerid][8], 2);
    PlayerTextDrawSetProportional(playerid, speedoo_PTD[playerid][8], 1);
    PlayerTextDrawSetShadow(playerid, speedoo_PTD[playerid][8], 1);

 

 

 

Хм.. сделал команду, для показа этого текстдрава. Первый текстдрав идет нормально, но все последующие превращаются в инфернус.. по середине

 

Share this post


Link to post
  • 0

ну, и циклом хайд текстдрав сделай:

for(new i = 0; i < 9; i++)
TextDrawHideForPlayer //вроде, не помню.

 

Share this post


Link to post
  • 0
9 часов назад, keyl1337 сказал:

ну, и циклом хайд текстдрав сделай:


for(new i = 0; i < 9; i++)
TextDrawHideForPlayer //вроде, не помню.

 

я знаю как скрывать тд. мне нужно убрать инфернус с середины экрана. 

я пробывал искать в коде великую строчку. :|

Share this post


Link to post
  • 0

По идее, инфернус это PreviewModel, вот, значит попробуй найти TextDrawSetPreviewModel

 
 

Share this post


Link to post
  • 0
1 час назад, keyl1337 сказал:

По идее, инфернус это PreviewModel, вот, значит попробуй найти TextDrawSetPreviewModel

 
 

:???_2:

Ничего толком не нашел... Возможно я ослеп..
(Если плохо видно в спойлере - https://i.imgur.com/oXtbq3v.png)

Спойлер

oXtbq3v.png

 

Edited by FakeNan

Share this post


Link to post
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • yan2348
      By yan2348
      Строка 186: mysql_format(sunlightrp, query, sizeof(query), fmt_query,Player[playerid][pName]);
      В это строке куча ерроров:
      error 017: undefined symbol "sunlightrp" 
      error 017: undefined symbol "Player"
      warning 215: expression has no effect
      error 001: expected token: ";", but found "]"
      fatal error 107: too many error messages on one line 

      Кто поможет как исправить?
      Заранее спасибо!