- 0
Problema progressbar
-
Similar Content
-
- 1 reply
- 147 views
-
Problema
By ImJustSlim,
- 3 answers
- 259 views
-
- 2 replies
- 141 views
-
- 1 answer
- 283 views
-
- 6 answers
- 1,126 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
StrypS
Salut all, am si eu o problema cu progreesbar nu se afiseaza pe server cand ma loghez, am facut si un textdraw pentru progressbar care arata cam asa exemplu: Level 1 (2/6 RP), nici acesta nu este afisat o sa va dau toate coordonatele adaugate de mine, nu mai scriu unde sunt adaugate ca sa mai uitat prin el 2 scripteri si au zis ca sunt bine asezate si nu stiu dece nu merg
new PlayerText:LevelTD[MAX_PLAYERS]; //textdraw
new PlayerBar:LevelBar[MAX_PLAYERS]; //progressbar
LevelTD[playerid] = CreatePlayerTextDraw(playerid, 554.666503, 124.874069, "Level: 5 (28/30 RP)");
PlayerTextDrawLetterSize(playerid, LevelTD[playerid], 0.190333, 1.077333);
PlayerTextDrawAlignment(playerid, LevelTD[playerid], 2);
PlayerTextDrawColor(playerid, LevelTD[playerid], -1);
PlayerTextDrawSetShadow(playerid, LevelTD[playerid], 0);
PlayerTextDrawSetOutline(playerid, LevelTD[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, LevelTD[playerid], 58);
PlayerTextDrawFont(playerid, LevelTD[playerid], 2);
PlayerTextDrawSetProportional(playerid, LevelTD[playerid], 1);
PlayerTextDrawSetShadow(playerid, LevelTD[playerid], 0);
UpdateProgressBar(playerid)
{
new string[64], expamount;
if(PlayerInfo[playerid][pLevel] == 1 || PlayerInfo[playerid][pLevel] == 2 || PlayerInfo[playerid][pLevel] == 3 || PlayerInfo[playerid][pLevel] == 4) expamount = PlayerInfo[playerid][pLevel]*2;
else if(PlayerInfo[playerid][pLevel] >= 5) expamount = PlayerInfo[playerid][pLevel]*levelexp;
format(string, sizeof(string), "Level: %d (%d/%d RP)", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pExp], expamount);
PlayerTextDrawSetString(playerid, LevelTD[playerid], string);
SetPlayerProgressBarValue(playerid, LevelBar[playerid], PlayerInfo[playerid][pExp]);
return 1;
}
ShowProgressBar(playerid)
{
expamount;
if(PlayerInfo[playerid][pLevel] == 1 || PlayerInfo[playerid][pLevel] == 2 || PlayerInfo[playerid][pLevel] == 3 || PlayerInfo[playerid][pLevel] == 4) expamount = PlayerInfo[playerid][pLevel]*2;
else if(PlayerInfo[playerid][pLevel] >= 5) expamount = PlayerInfo[playerid][pLevel]*levelexp;
LevelBar[playerid] = CreatePlayerProgressBar(playerid, 505.00, 138.00, 99.50, 3.50, -213077640, 100.0);
SetPlayerProgressBarMaxValue(playerid, LevelBar[playerid], expamount);
SetPlayerProgressBarValue(playerid, LevelBar[playerid], PlayerInfo[playerid][pExp]);
ShowPlayerProgressBar(playerid, LevelBar[playerid]);
PlayerTextDrawShow(playerid, LevelTD[playerid]);
UpdateProgressBar(playerid);
return 1;
}
DestroyPlayerProgressBar(playerid, LevelBar[playerid]);
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.