Jump to content
  • 0

Problema textdraw


Alx22

Question

Salut Sa-Mp.Ro,

Am o problema cu textdraw-ul de la kilometraj, codul meu arata cam asa:

for(new i = 0; i < sizeof(TDKM); i++)
        {
          PlayerTextDrawShow(playerid, TDKM[playerid][i]);
         }
for(new i = 0; i < sizeof(TDKM); i++)
        {
            PlayerTextDrawHide(playerid, TDKM[playerid][i]);
        }

el trebuie pus la OnPlayerStateChange sub "newstate == PLAYER_STATE_DRIVER" si "newstate == PLAYER_STATE_ONFOOT", daca il pun acolo practic, tot ce este sub acest cod nu mai functioneaza. Sub acel public mai am astfel de coduri, daca-l pun pe acesta ultimul nu mai functioneaza cod-ul pentru ascunderea textdraw-urilor.. Am incercat sa le pun intr-un stock si apoi sa adaug stock-ul acolo dar tot asa face..

 

 

Multumesc mult pentru timp-ul acordat.

Edited by Alx22
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Aici textdraw-ul

TDKM[playerid][0] = CreatePlayerTextDraw(playerid, 574.500000, 378.125000, "~R~D~W~_N_R");
	PlayerTextDrawLetterSize(playerid, TDKM[playerid][0], 0.377000, 1.403125);
	PlayerTextDrawAlignment(playerid, TDKM[playerid][0], 3);
	PlayerTextDrawColor(playerid, TDKM[playerid][0], -1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][0], 0);
	PlayerTextDrawSetOutline(playerid, TDKM[playerid][0], 0);
	PlayerTextDrawBackgroundColor(playerid, TDKM[playerid][0], 255);
	PlayerTextDrawFont(playerid, TDKM[playerid][0], 2);
	PlayerTextDrawSetProportional(playerid, TDKM[playerid][0], 1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][0], 0);

	TDKM[playerid][1] = CreatePlayerTextDraw(playerid, 556.000000, 340.500000, "VITEZA:_222_KM/H");
	PlayerTextDrawLetterSize(playerid, TDKM[playerid][1], 0.182000, 0.821250);
	PlayerTextDrawAlignment(playerid, TDKM[playerid][1], 2);
	PlayerTextDrawColor(playerid, TDKM[playerid][1], -1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][1], 0);
	PlayerTextDrawSetOutline(playerid, TDKM[playerid][1], 0);
	PlayerTextDrawBackgroundColor(playerid, TDKM[playerid][1], 255);
	PlayerTextDrawFont(playerid, TDKM[playerid][1], 2);
	PlayerTextDrawSetProportional(playerid, TDKM[playerid][1], 1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][1], 0);

	TDKM[playerid][2] = CreatePlayerTextDraw(playerid, 558.000000, 350.125000, "Combustibil:_100_L");
	PlayerTextDrawLetterSize(playerid, TDKM[playerid][2], 0.182000, 0.821250);
	PlayerTextDrawAlignment(playerid, TDKM[playerid][2], 2);
	PlayerTextDrawColor(playerid, TDKM[playerid][2], -1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][2], 0);
	PlayerTextDrawSetOutline(playerid, TDKM[playerid][2], 0);
	PlayerTextDrawBackgroundColor(playerid, TDKM[playerid][2], 255);
	PlayerTextDrawFont(playerid, TDKM[playerid][2], 2);
	PlayerTextDrawSetProportional(playerid, TDKM[playerid][2], 1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][2], 0);

	TDKM[playerid][3] = CreatePlayerTextDraw(playerid, 588.500000, 359.675048, "STATUS:_~r~Incuiat");
	PlayerTextDrawLetterSize(playerid, TDKM[playerid][3], 0.182000, 0.821250);
	PlayerTextDrawAlignment(playerid, TDKM[playerid][3], 3);
	PlayerTextDrawColor(playerid, TDKM[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][3], 0);
	PlayerTextDrawSetOutline(playerid, TDKM[playerid][3], 0);
	PlayerTextDrawBackgroundColor(playerid, TDKM[playerid][3], 255);
	PlayerTextDrawFont(playerid, TDKM[playerid][3], 2);
	PlayerTextDrawSetProportional(playerid, TDKM[playerid][3], 1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][3], 0);

	TDKM[playerid][4] = CreatePlayerTextDraw(playerid, 558.000000, 368.500000, "Kilometraj:_100_KM");
	PlayerTextDrawLetterSize(playerid, TDKM[playerid][4], 0.182000, 0.821250);
	PlayerTextDrawAlignment(playerid, TDKM[playerid][4], 2);
	PlayerTextDrawColor(playerid, TDKM[playerid][4], -1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][4], 0);
	PlayerTextDrawSetOutline(playerid, TDKM[playerid][4], 0);
	PlayerTextDrawBackgroundColor(playerid, TDKM[playerid][4], 255);
	PlayerTextDrawFont(playerid, TDKM[playerid][4], 2);
	PlayerTextDrawSetProportional(playerid, TDKM[playerid][4], 1);
	PlayerTextDrawSetShadow(playerid, TDKM[playerid][4], 0);

Aici public-ul OnPlayerStateChange https://pastebin.com/fiHfkEyd

 

Link to comment
Share on other sites

  • 0

incearca asa

if(newstate == PLAYER_STATE_DRIVER)
    {
        PlayerTextDrawShow(playerid, TDKM[playerid][0]);
        PlayerTextDrawShow(playerid, TDKM[playerid][1]);
        PlayerTextDrawShow(playerid, TDKM[playerid][2]);
        PlayerTextDrawShow(playerid, TDKM[playerid][3]);
        PlayerTextDrawShow(playerid, TDKM[playerid][4]);
        PlayerTextDrawShow(playerid, TDKM[playerid][5]);
    }

Edited by MiritaXD
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.