Need some Help here :(
#1

Hello everyone, i have a problem with the Progress Bars creator, i have successfully made a Hunger Bar But when i'm trying to update on a one second timer, it doesn't work with this code

pawn Код:
SetProgressBarValue(HungerBar[i], -5.0);
UpdateProgressBar(HungerBar[i], i);
But works when i make set the value to positive, for example 5.0, can you help me?
Reply
#2

If you have function like GetProgressBarValue then you can try:

pawn Код:
SetProgressBarValue(HungerBar[i], GetProgressBarValue(HungerBar[i]) -5.0 );
Reply
#3

Not working, thanks anyway...
Reply
#4

You can try this version( for me better ) :

pawn Код:
new
    Float:BarValue[ MAX_PLAYERS ];

stock SetBarValue( playerid, Float:ammount )
{
    BarValue[ playerid ] += ammount;
    SetProgressBarValue( barID, BarValue[ playerid ] );
    return UpdateProgressBar( barID, playerid );
}
USE:

pawn Код:
SetBarValue( playerid, -5.0 );
But you need edit something in stock! ( I mean barID to ur barID )

Or better

pawn Код:
stock SetBarValue( playerid, barID, Float:ammount )
{
    BarValue[ playerid ] += ammount;
    SetProgressBarValue( barID, BarValue[ playerid ] );
    return UpdateProgressBar( barID, playerid );
}
Reply
#5

This is not working too...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)