13.11.2012, 16:13
I got a tag miss match with fuelbar = CreatePlayerProgressBar(playerid, Float:548.5, Float:36.9, Float:55.5, Float:3.2, LIGHTGREEN, 100);
Heres the stock from the progress.inc
Heres the stock from the progress.inc
PHP код:
stock PlayerBar:CreatePlayerProgressBar(playerid, Float:x, Float:y, Float:width=55.5, Float:height=3.2, color, Float:max=100.0)
{
new
barid;
for(barid = 0; barid < MAX_PLAYER_BARS; ++barid) // Changed from `Bars` to `MAX_PLAYER_BARS` rather than getting the size of the second cell
if(!PlayerBars[playerid][barid][pbar_valid]) break;
if(PlayerBars[playerid][barid][pbar_valid] || barid == MAX_PLAYER_BARS)
return INVALID_PLAYER_BAR_ID;
new PlayerText:in_t = PlayerBarText[barid][pbar_textdraw1] = CreatePlayerTextDraw(playerid, x, y, "_");
PlayerTextDrawUseBox (playerid, in_t, 1);
PlayerTextDrawTextSize (playerid, in_t, x + width, 0.0);
PlayerTextDrawLetterSize (playerid, in_t, 1.0, height / 10);
PlayerTextDrawBoxColor (playerid, in_t, 0x00000000 | (color & 0x000000FF));
in_t = PlayerBarText[barid][pbar_textdraw2] = CreatePlayerTextDraw(playerid, x + 1.2, y + 2.15, "_");
PlayerTextDrawUseBox (playerid, in_t, 1);
PlayerTextDrawTextSize (playerid, in_t, x + width - 2.0, 0.0);
PlayerTextDrawLetterSize (playerid, in_t, 1.0, height / 10 - 0.35);
PlayerTextDrawBoxColor (playerid, in_t, (color & 0xFFFFFF00) | (0x66 & ((color & 0x000000FF) / 2)));
in_t = PlayerBarText[barid][pbar_textdraw3] = CreatePlayerTextDraw(playerid, x + 1.2, y + 2.15, "_");
PlayerTextDrawTextSize (playerid, in_t, pb_percent(x, width, max, 1.0), 0.0);
PlayerTextDrawLetterSize (playerid, in_t, 1.0, height / 10 - 0.35);
PlayerTextDrawBoxColor (playerid, in_t, color);
PlayerBars[playerid][barid][pbar_x] = x;
PlayerBars[playerid][barid][pbar_y] = y;
PlayerBars[playerid][barid][pbar_w] = width;
PlayerBars[playerid][barid][pbar_h] = height;
PlayerBars[playerid][barid][pbar_m] = max;
PlayerBars[playerid][barid][pbar_colour] = color;
PlayerBars[playerid][barid][pbar_valid] = true;
return PlayerBar:barid;
}