Jump to content

[REZOLVAT] Progress bar


Nurdock
 Share

Recommended Posts

  • Retired

Daca am 0 rp este k, dar daca am sa zicem 1 se incarca peste limita maxima(la mine ar trebui sa fie max la 120.000000 dar trece de ea)

code:

	globalVariables[playerid][neededpoints] = (0.000000 + playerVariables[playerid][pRP] * 100 / playerVariables[playerid][pLevel]*levelexp); // 267 reprezinta textsize-ul textdraw-ului ala NEGRU care sta peste textdraw-ul ala transparent si e 0%, practic de la textsize-ul ala o sa inceapa sa incarce progressbar-ul sa zic asa, tu editezi 267 dupa textdraw-ul tau.
	PlayerTextDrawTextSize(playerid, LvlProgress[2], globalVariables[playerid][neededpoints], 4.000000);

 

Link to comment
Share on other sites

  • Retired
10 hours ago, Nurdock said:

Daca am 0 rp este k, dar daca am sa zicem 1 se incarca peste limita maxima(la mine ar trebui sa fie max la 120.000000 dar trece de ea)

code:


	globalVariables[playerid][neededpoints] = (0.000000 + playerVariables[playerid][pRP] * 100 / playerVariables[playerid][pLevel]*levelexp); // 267 reprezinta textsize-ul textdraw-ului ala NEGRU care sta peste textdraw-ul ala transparent si e 0%, practic de la textsize-ul ala o sa inceapa sa incarce progressbar-ul sa zic asa, tu editezi 267 dupa textdraw-ul tau.
	PlayerTextDrawTextSize(playerid, LvlProgress[2], globalVariables[playerid][neededpoints], 4.000000);

 

NeededPoints trebuie sa fie Float, nu integer.

Link to comment
Share on other sites

  • Retired

T/C a fost rezolvat

Asa trebuia sa fac, aparent nu e 120 max cum e la textsize

	globalVariables[playerid][neededpoints] = (0.000000 + playerVariables[playerid][pRP] * 13.333333 / playerVariables[playerid][pLevel]*levelexp); // 267 reprezinta textsize-ul textdraw-ului ala NEGRU care sta peste textdraw-ul ala transparent si e 0%, practic de la textsize-ul ala o sa inceapa sa incarce progressbar-ul sa zic asa, tu editezi 267 dupa textdraw-ul tau.
	PlayerTextDrawTextSize(playerid, LvlProgress[2], globalVariables[playerid][neededpoints], 4.000000);

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...