Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: ᗪ卂乂 poslato Februar 10, 2018, 18:29:03 POSLE PODNE

Naslov: exp td
Poruka od: ᗪ卂乂 poslato Februar 10, 2018, 18:29:03 POSLE PODNE
Detaljan opis problema: uradio sam exp dt i sve sam podesio kad udjem ig pise 0/2 umesto 0/4 i kad dam sebi exp ili dobijem platu nece da se promeni na 1/4, verovatno treba neki update ili nesto ali ja to ne znam da napravim.
Dio skripte:
[pawn]new PlayerText:ExpText[MAX_PLAYERS];[/pawn]
[pawn]   ExpText[playerid] = CreatePlayerTextDraw(playerid, 501.999969, 108.681480, "EXP:0/4");
   PlayerTextDrawLetterSize(playerid, ExpText[playerid], 0.299665, 1.181035);
   PlayerTextDrawAlignment(playerid, ExpText[playerid], 1);
   PlayerTextDrawColor(playerid, ExpText[playerid], -1);
   PlayerTextDrawSetShadow(playerid, ExpText[playerid], 0);
   PlayerTextDrawSetOutline(playerid, ExpText[playerid], 1);
   PlayerTextDrawBackgroundColor(playerid, ExpText[playerid], 51);
   PlayerTextDrawFont(playerid, ExpText[playerid], 2);
   PlayerTextDrawSetProportional(playerid, ExpText[playerid], 1);
   new textexp[128];
   new iskustvo; iskustvo = (PlayerInfo[playerid][pLevel] * 2) + 2;
    format(textexp,sizeof(textexp),"EXP: %d/%d",PlayerInfo[playerid][pExp], iskustvo);
   PlayerTextDrawSetString(playerid,ExpText[playerid],textexp);[/pawn]
[pawn]PlayerTextDrawShow(playerid, ExpText[playerid]);[/pawn]
Neke slike/video za lakse dobivanje pomoci(neobavezno): moze neko da helpa?
Naslov: Odg: exp td
Poruka od: lucius poslato Februar 10, 2018, 18:39:25 POSLE PODNE
new potrebanexp = PlayerInfo[playerid][pLevel] * 2 + 2; // 1 * 2 + 2 = 4; 2 * 2 + 2 = 6...
http://wiki.sa-mp.com/wiki/PlayerTextDrawSetString // update string
Naslov: Odg: exp td
Poruka od: ᗪ卂乂 poslato Februar 10, 2018, 19:06:34 POSLE PODNE
Citat: \nLucius poslato Februar 10, 2018, 18:39:25 POSLE PODNE
new potrebanexp = PlayerInfo[playerid][pLevel] * 2 + 2; // 1 * 2 + 2 = 4; 2 * 2 + 2 = 6...
http://wiki.sa-mp.com/wiki/PlayerTextDrawSetString // update string
Hvala eo sredio sam <3