Jump to content

[REZOLVAT] Progress bar


Nurdock
 Share

Recommended Posts

  • Retired

Salut, cum as putea afla cat reprezinta o bucatica dintr-un progressbar facut din Textdraw.

Vreau sa fac un progressbar din td care o sa il folosesc la level-ul jucatorilor.

Textdraw-urile:

LvlProgress[0] = CreatePlayerTextDraw(playerid, 479.500000, 169.866668, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, LvlProgress[0], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, LvlProgress[0], 120.000000, 4.000000);
PlayerTextDrawAlignment(playerid, LvlProgress[0], 1);
PlayerTextDrawColor(playerid, LvlProgress[0], 10616636);
PlayerTextDrawSetShadow(playerid, LvlProgress[0], 0);
PlayerTextDrawSetOutline(playerid, LvlProgress[0], 0);
PlayerTextDrawFont(playerid, LvlProgress[0], 4);

LvlProgress[1] = CreatePlayerTextDraw(playerid, 538.500000, 159.288848, "Level 1 (3/3 respect)");
PlayerTextDrawLetterSize(playerid, LvlProgress[1], 0.139498, 0.934221);
PlayerTextDrawAlignment(playerid, LvlProgress[1], 2);
PlayerTextDrawColor(playerid, LvlProgress[1], -1);
PlayerTextDrawSetShadow(playerid, LvlProgress[1], 0);
PlayerTextDrawSetOutline(playerid, LvlProgress[1], 1);
PlayerTextDrawBackgroundColor(playerid, LvlProgress[1], 51);
PlayerTextDrawFont(playerid, LvlProgress[1], 2);
PlayerTextDrawSetProportional(playerid, LvlProgress[1], 1);

LvlProgress[2] = CreatePlayerTextDraw(playerid, 479.500000, 169.622222, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, LvlProgress[2], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, LvlProgress[2], 57.500000, 4.000000);
PlayerTextDrawAlignment(playerid, LvlProgress[2], 1);
PlayerTextDrawColor(playerid, LvlProgress[2], 7339919);
PlayerTextDrawSetShadow(playerid, LvlProgress[2], 0);
PlayerTextDrawSetOutline(playerid, LvlProgress[2], 0);
PlayerTextDrawFont(playerid, LvlProgress[2], 4);

Daca mai trebuie sa va arat ceva ca sa imi puteti explica mai bine spuneti si o sa va arat...

Link to comment
Share on other sites

Ai nevoie de: http://forum.sa-mp.com/showthread.php?t=537468

new PlayerBar:Bar[MAX_PLAYERS];
Bar[playerid] = CreatePlayerProgressBar(playerid, 22.999992, 283.185150, 130, 10, COLOR_WHITE, 100.0, BAR_DIRECTION_RIGHT);
ShowPlayerProgressBar(playerid, Bar[playerid]);
SetPlayerProgressBarMaxValue(playerid, Bar[playerid], 100);
SetPlayerProgressBarValue(playerid, Bar[playerid], 0);
Edited by iMatt

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

Hm, ai putea sa iei valorea maxima pe care o poate avea progressbar-ul (punctele necesare pentru level up) si sa o imparti la valorea pe care o are (punctele pe care jucatorul deja le detine). Dupa:

new copy = PlayerInfo[playerid][pRespectPoints];
while(copy >= rezultatul_valorilor_impartite)
{
  copy -= rezultatul_valorilor_impartite;
  // adaugi inca o linie la progressbar
}

 

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

  • Retired
6 minutes ago, iMatt said:

Hm, ai putea sa iei valorea maxima pe care o poate avea progressbar-ul (punctele necesare pentru level up) si sa o imparti la valorea pe care o are (punctele pe care jucatorul deja le detine). Dupa:


new copy = PlayerInfo[playerid][pRespectPoints];
while(copy >= rezultatul_valorilor_impartite)
{
  copy -= rezultatul_valorilor_impartite;
  // adaugi inca o linie la progressbar
}

 

la 

rezultatul_valorilor_impartite

te referi sa impart marimea maima pe care o poate avea td-ul la cate rp-uri ii trebuie?

Link to comment
Share on other sites

1 minute ago, Nurdock said:

la 


rezultatul_valorilor_impartite

te referi sa impart marimea maima pe care o poate avea td-ul la cate rp-uri ii trebuie?

rp-uri necesare / rp-urile jucatorului

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

  • Administrator

eeee, multe mai vrei :)))

 

Acum 11 minute, iMatt a spus:

Hm, ai putea sa iei valorea maxima pe care o poate avea progressbar-ul (punctele necesare pentru level up) si sa o imparti la valorea pe care o are (punctele pe care jucatorul deja le detine). Dupa:


new copy = PlayerInfo[playerid][pRespectPoints];
while(copy >= rezultatul_valorilor_impartite)
{
  copy -= rezultatul_valorilor_impartite;
  // adaugi inca o linie la progressbar
}

 

Am eu o metoda mult mai simpla decat asta, cu Float. ? 

Link to comment
Share on other sites

Just now, Leonard said:

eeee, multe mai vrei :)))

 

Am eu o metoda mult mai simpla decat asta, cu Float. ? 

Oof, metoda asta am gandit o in 5 minute =))

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

  • Retired
Just now, iMatt said:

rp-uri necesare / rp-urile jucatorului

Aha, dar totusi cum pot sa gasesc o bucata din td?

am incercat sa fac asta:

globalVariables[playerid][neededpoints] = 120.000000-120.000000/playerVariables[playerid][pLevel]*levelexp;

dar nu merge...

Link to comment
Share on other sites

  • Administrator
Acum 4 minute, iMatt a spus:

Oof, metoda asta am gandit o in 5 minute =))

Gandim la fel inseamna :))

Acum 3 minute, Nurdock a spus:

Aha, dar totusi cum pot sa gasesc o bucata din td?

am incercat sa fac asta:


globalVariables[playerid][neededpoints] = 120.000000-120.000000/playerVariables[playerid][pLevel]*levelexp;

dar nu merge...

N-o sa-ti mearga metoda aia nici in vecii vecilor.

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...