- 0
Problema progressbar
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
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]);
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now