Progress Bar Not Showing Up
#1

Ok, so I have just gotten the updated version of Progress Bar 1.3.1 from GitHub!

The problem?


The bar doesn't even show!
MY CODE

pawn Код:
#include <progressbars> //Obviuosly it needs included.

//The Progress Bar Per-Player Timer
new SpyBarUpdateTimer[MAX_PLAYERS];

//OnPlayerConnect
pData[playerid][SpyBar] = CreatePlayerProgressBar(playerid, 100, 100, 55.5, 3.2, COLOR_BLACK, 100.0);

//OnPlayerSpawn
UpdatePlayerProgressBar(playerid, pData[playerid][SpyBar]);

//OnPlayerKeyState
        if(PRESSED(KEY_CROUCH))
        {
            KillTimer(SpyBarUpdateTimer[playerid]);
            if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK)
            {
                if(GetPlayerProgressBarValue(playerid, pData[playerid][SpyBar]) > float(5))
                {
                    foreach(Player, i) ShowPlayerNameTagForPlayer(playerid, i, false);
                    SetPlayerColor(playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
                }
                SpyBarUpdateTimer[playerid]=SetTimerEx("SpyBarUpdate", 20, 1, "ui", playerid, 0);
            }
                        else
            {
                foreach(Player, i) ShowPlayerNameTagForPlayer(playerid, i, true);
                SetPlayerColor(playerid, (GetPlayerColor(playerid) & 0xFFFFFFFF));
                SpyBarUpdateTimer[playerid]=SetTimerEx("SpyBarUpdate", 20, 1, "ui", playerid, 1);
            }
        }

//My Increase/Decrease Callback/Timer
forward SpyBarUpdate(playerid, mode);
public SpyBarUpdate(playerid, mode)
{
    if(mode == 0)
    {
        if(GetPlayerProgressBarValue(playerid, pData[playerid][SpyBar]) != 0)
        SetPlayerProgressBarValue(playerid, pData[playerid][SpyBar], GetPlayerProgressBarValue(playerid, pData[playerid][SpyBar])-1.0);
        else
        {
            foreach(Player, i) ShowPlayerNameTagForPlayer(playerid, i, true);
            SetPlayerColor(playerid, (GetPlayerColor(playerid) & 0xFFFFFFFF));
            KillTimer(SpyBarUpdateTimer[playerid]);
        }
    }
    else if(mode == 1)
    SetPlayerProgressBarValue(playerid, pData[playerid][SpyBar], GetPlayerProgressBarValue(playerid, pData[playerid][SpyBar])+1.0);
    if(GetPlayerProgressBarValue(playerid, pData[playerid][SpyBar]) >= 100) KillTimer(SpyBarUpdateTimer[playerid]);

    UpdatePlayerProgressBar(playerid, pData[playerid][SpyBar]);
}
And yes, the bar is saved to the players data variables, and I know that is set up CORRECT.
Reply
#2

Because you don't have
Quote:

ShowPlayerProgressBar(playerid, barid);

in your script.
Reply
#3

Quote:
Originally Posted by WopsS
Посмотреть сообщение
Because you don't have in your script.
Read the UpdatePlayerProgressBar(playerid, barid) function inside the include... It hides then shows the bar... :P
Reply
#4

Quote:
Originally Posted by Crayder
Посмотреть сообщение
Read the UpdatePlayerProgressBar(playerid, barid) function inside the include... It hides then shows the bar... :P
You readed all words in my replay? It NEVER show if you don't put
Quote:

ShowPlayerProgressBar(playerid, barid);

You don't have it in your script. You must to show it and after that to update it.
Reply
#5

Quote:
Originally Posted by WopsS
Посмотреть сообщение
You readed all words in my replay? It NEVER show if you don't put

You don't have it in your script.
DUDE! Read my REPLY! It WILL because UpdatePlayerProgressBar(playerid, barid) has the ShowPlayerProgressBar(playerid, barid) built into it! GO READ INSIDE THE INCLUDE!
Reply
#6

Quote:
Originally Posted by Crayder
Посмотреть сообщение
DUDE! Read my REPLY! It WILL because UpdatePlayerProgressBar(playerid, barid) has the ShowPlayerProgressBar(playerid, barid) built into it! GO READ INSIDE THE INCLUDE!
Are you kidding me?! READ CAREFULLY ALL WORDS IN
Quote:

Show_Player_Progress_Bar

Where you have that in your script?!

P.S: It have it WITH RETURN! You know what "Update" do?

Let's take a real example:

You go to shop with 50E and you will buy a soda with 20E, ok?
You go to pay for it, the seller will give you the rest without you show him / give him your 50E?
You will get the rest after you give / "show" he your 50E, and after that you will have "updated" money, in minus ...

Here is same, you first to show the progress bar and after that you will update it, you understand now?

Edit: Just try with
Код:
ShowPlayerProgressBar(playerid, barid)
, you don't die if you will try...
Reply
#7

IT GETS SHOWED WHEN UPDATE GETS CALLED YOU DUMBSHIT! ASK ANY SCRIPTER ON THIS FORUM, THEY WILL TELL YOU WHO IS RIGHT!
Reply
#8

Quote:
Originally Posted by Crayder
Посмотреть сообщение
IT GETS SHOWED WHEN UPDATE GETS CALLED YOU DUMBSHIT! ASK ANY SCRIPTER ON THIS FORUM, THEY WILL TELL YOU WHO IS RIGHT!
Why this peoples like you have access to internet (DUMBSHIT)? Ok, let's come ****** and others to say who have right. But first take a look here "the big scripter" http://forum.sa-mp.com/newreply.php?...eply&p=2939004 and sure here https://github.com/Southclaw/PlayerProgressBar/issues/1 , now how have right?

With this replays you show us, you don't have minimum of 14 years.
Reply
#9

Neither of those post show anything! He said nothing about needing SHOW, UPDATE IS THE SAME THING! I WISH I COULD GET Y-LESS OR ANOTHER SMARTER PERSON HERE! YOU SIR ARE A COMPLETE IDIOT!
Reply
#10

Quote:
Originally Posted by Crayder
Посмотреть сообщение
Neither of those post show anything! He said nothing about needing SHOW, UPDATE IS THE SAME THING! I WISH I COULD GET Y-LESS OR ANOTHER SMARTER PERSON HERE! YOU SIR ARE A COMPLETE IDIOT!
Ok, I understand you are racist. But, ****** and other smarter person then me will say something, and if you don't saw, you are ... or you need glasses.

Код:
public OnFilterScriptInit()
{
    gBarID = CreatePlayerProgressBar(0, 300.0, 180.0, 40.0, 3.5, 0xFFFF00FF);
    ShowPlayerProgressBar(0, gBarID); // what is here?

    return 1;
}
I have a question, why you don't want to try? This disscution, if you try, will be ended and much of our time was saved...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)