Jump to content
  • 0

[Problema] Speedometer - Aranjare


GoFUS

Question

Salutare, sper sa nu deranjez pe nimeni, am o problema destul de enervanta si sincer nu i-am dat de cap pana acum, am sa incerc sa o mai repar pana primesc un raspuns din partea voastra, folosesc gamemode-ul Bottles, este un mic edit.

Am incercat sa refac Speedometer-ul sa inlocuiesc td-urile, insa problema este ca nu s-au asezat corect, decat primele td-uri (Viteza si Benzina).

Asa ar trebuii sa arate: kTf0HzS.png

Asa arata:

EXfGTor.png

Codul TD:

    TSpeedometer[playerid][0] = CreatePlayerTextDraw(playerid, 473.250000, 357.583221, "Viteza:"), /// Viteza
	PlayerTextDrawLetterSize(playerid, TSpeedometer[playerid][0], 0.259374, 1.366666),
	PlayerTextDrawAlignment(playerid, TSpeedometer[playerid][0], 1),
	PlayerTextDrawColor(playerid, TSpeedometer[playerid][0], -1),
	PlayerTextDrawSetShadow(playerid, TSpeedometer[playerid][0], 0),
	PlayerTextDrawSetOutline(playerid, TSpeedometer[playerid][0], 1),
	PlayerTextDrawBackgroundColor(playerid, TSpeedometer[playerid][0], 51),
	PlayerTextDrawFont(playerid, TSpeedometer[playerid][0], 1),
	PlayerTextDrawSetProportional(playerid, TSpeedometer[playerid][0], 1);
	
	
	
	TSpeedometer[playerid][1] = CreatePlayerTextDraw(playerid, 473.499938, 368.083312, "Benzina:"), //Benzina
	PlayerTextDrawLetterSize(playerid, TSpeedometer[playerid][1], 0.274999, 1.395833),
	PlayerTextDrawAlignment(playerid, TSpeedometer[playerid][1], 1),
	PlayerTextDrawColor(playerid, TSpeedometer[playerid][1], -1),
	PlayerTextDrawSetShadow(playerid, TSpeedometer[playerid][1], 0),
	PlayerTextDrawSetOutline(playerid, TSpeedometer[playerid][1], 1),
	PlayerTextDrawBackgroundColor(playerid, TSpeedometer[playerid][1], 51),
	PlayerTextDrawFont(playerid, TSpeedometer[playerid][1], 1),
	PlayerTextDrawSetProportional(playerid, TSpeedometer[playerid][1], 1);
	
	
	TSpeedometer[playerid][2] = CreatePlayerTextDraw(playerid, 473.125000, 379.166625, "Status:"); // Status
	PlayerTextDrawLetterSize(playerid, TSpeedometer[playerid][2], 0.299999, 1.162499);
	PlayerTextDrawAlignment(playerid, TSpeedometer[playerid][2], 1);
	PlayerTextDrawColor(playerid, TSpeedometer[playerid][2], -1);
	PlayerTextDrawSetShadow(playerid, TSpeedometer[playerid][2], 0);
	PlayerTextDrawSetOutline(playerid, TSpeedometer[playerid][2], 1);
	PlayerTextDrawBackgroundColor(playerid, TSpeedometer[playerid][2], 51);
	PlayerTextDrawFont(playerid, TSpeedometer[playerid][2], 1);
	PlayerTextDrawSetProportional(playerid, TSpeedometer[playerid][2], 1);
	
	TSpeedometer[playerid][3] = CreatePlayerTextDraw(playerid, 474.375000, 388.500061, "Kilometraj:");
	PlayerTextDrawLetterSize(playerid, TSpeedometer[playerid][3], 0.290624, 1.133332);
	PlayerTextDrawAlignment(playerid, TSpeedometer[playerid][3], 1);
	PlayerTextDrawColor(playerid, TSpeedometer[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, TSpeedometer[playerid][3], 0);
	PlayerTextDrawSetOutline(playerid, TSpeedometer[playerid][3], 1);
	PlayerTextDrawBackgroundColor(playerid, TSpeedometer[playerid][3], 51);
	PlayerTextDrawFont(playerid, TSpeedometer[playerid][3], 1);
	PlayerTextDrawSetProportional(playerid, TSpeedometer[playerid][3], 1);

 

Si functia cu TextDrawString-urile

ci = GetPlayerSpeed(i, 0), GetVehicleHealth(pInfo[i][aVar][1], hpvv), GetVehicleParamsEx(pInfo[i][aVar][1], vParams[0],vParams[1],vParams[2],vParams[3],vParams[4],vParams[5],vParams[6]),
            format(SpStr, sizeof(SpStr), "Viteza: ~y~%d km/h", ci), PlayerTextDrawSetString(i, TSpeedometer[i][0], SpStr),
            format(SpStr, sizeof(SpStr), "Status: %s ~w~/ ~y~%0.0f%", vParams[3] <= 0 ? ("~y~deschis") : ("~r~inchis"), hpvv), PlayerTextDrawSetString(i, TSpeedometer[i][2], SpStr);
            if(vVar[3][pInfo[i][aVar][1]] <= 0 ? format(SpStr, sizeof(SpStr), "Benzina: ~r~fara") : format(SpStr, sizeof(SpStr), "Benzina: ~y~%d%", vVar[3][pInfo[i][aVar][1]])) PlayerTextDrawSetString(i, TSpeedometer[i][1], SpStr);
            if(vVar[1][pInfo[i][aVar][1]] == 1 && !IsPlayerAfk(i)) format(SpStr, sizeof(SpStr), "Kilometraj: ~y~%.0f", KMVeh[pInfo[i][aVar][1]]), PlayerTextDrawSetString(i, TSpeedometer[i][3], SpStr), KMVeh[pInfo[i][aVar][1]] += ci*0.0006;
            if(pInfo[i][aVar][72] > -1 && pInfo[i][pJob] == 4 && vVar[1][pInfo[i][aVar][72]] == 0) format(SpStr, sizeof(SpStr), "DISTANTA: ~y~%0.2fm", GetPlayerDistanceFromPoint(i, pInfo[i][PosW][0], pInfo[i][PosW][1], pInfo[i][PosW][2])), PlayerTextDrawSetString(i, RaceAr[i], SpStr);

 

Multumesc pentru atentie, oricum.

Discord                                  

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Vezi poate mai ai prin GM alte linii puse tot in zona aceea. Astfel, acestea se pot suprapune si de aia nu apar acolo unde tu le-ai asezat. Se poate sa fi gresit respectivul textdraw. 

Sfat: Eu zic sa pozitionezi putin mai sus acest textdraw si sa vezi daca mai ai aceasta eroare.

Edited by eltAndrei

SKINS SYSTEM BY ELTANDREI >> CLICK <<

DMV SYSTEM BY ELTANDREI >> CLICK <<

(!)SERVER DISCORD: https://discord.gg/8Hwd8EF

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.