[Include] L_ProgressBar v0.1
#1

I show L_ProgressBar which will help them create bar loaders as in windows, great for adding effects to functions that require load.

Functions
pawn Код:
SetPlayerProgressBar(playerid, Float:X, Float:Y, interval, name[]);
DestroyBarToPlayer(playerid);
IsPlayerBarCharged(playerid);

SetPlayerProgressBar(playerid, Float:X, Float:Y, interval, name[]);


-playerid: Id player that will create a bar
-Float:X and Float:Y: Coordinates of the screen location
-interval: velocity to be charged in milliseconds
-name:Name to display the bar

DestroyBarToPlayer(playerid);

The bar will destroy a player

IsPlayerBarCharged(playerid);

Check if the player already loaded bar

Test

[ame="http://www.youtube.com/watch?v=skH8xKRbY18"]http://www.youtube.com/watch?v=skH8xKRbY18[/ame]
Reply
#2

Nice !
Reply
#3

put an example of using the system
Reply
#4

pawn Код:
new Timer[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
    SetPlayerProgressBar(playerid, 150.0, 200.0, 100, "Charged Acount");
    Timer[playerid] = SetTimerEx("Check", 100, true, "i", playerid);
}
forward Check(playerid);
public Check(playerid)
{
    if(IsPlayerBarCharged(playerid))
    {
         SendClientMessage(playerid, -1, "Ready");
         KillTimer(Timer[playerid]);
    }
}
Reply
#5

Nice, +rep
Reply
#6

Nice 10/10
Reply
#7

Not bad, but I suggest you adding a callback which gets called when the bar is filled and a function that allows you to get the charge amount (like 50 or 68 when it's not fully loaded).
Reply
#8

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Not bad, but I suggest you adding a callback which gets called when the bar is filled and a function that allows you to get the charge amount (like 50 or 68 when it's not fully loaded).
good idea, in the next update.

Tankz guys.
Reply
#9

I was thinking to a thing like this. Just amazing. Good job.
Reply
#10

LuisGraph, Add one more parameter:

SetPlayerProgressBar(playerid, Float:X, Float:Y, interval, name[], count);

like this:

SetPlayerProgressBar(playerid, Float:X, Float:Y, interval, name[], 0);

ProgressBar counts from 0 up to 100%

or

SetPlayerProgressBar(playerid, Float:X, Float:Y, interval, name[], 50);

ProgressBar counts from 50 up to 100%
Reply
#11

Not bad Keep working on this !

EDIT: on my screen 100% looks like this lol:

Reply
#12

lol why is that? same thing happened to me in the 0.3e
Reply
#13

Very Nice.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)