Jump to content
  • 0

Problema textdraw


Question

Posted (edited)

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

5 answers to this question

Recommended Posts

  • 0
Posted

arata tot textdrawul cum este creat.

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

  • 0
Posted

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

 

  • 0
Posted (edited)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.