14.02.2018, 11:46
is their any way to make progress bar without progress include
if yes how please
if yes how please
create a looping timer that calls itself every few milliseconds, pushing another character to the bar.
You can use a variable to increase from 0 to 10 and when it reaches 10, you can stop the timer (by not recalling it again) and call the next phase (the textdraws to be shown or somethin') |
SetTimerEx
SetPlayerProgressBarValue
You will probably get errors if you try write your own as well. It is much simpler to use a widely-used and well tested include and fix the errors there, than to try and write your own from scratch.
|
#include <a_samp>
#include <progress2>
new PlayerBar:Bar0[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
Bar0[playerid] = CreatePlayerProgressBar(playerid, 608.000000, 307.000000, 8.500000, 94.199996, -1429936641, 100.0000, 2);
return 1;
}
public OnPlayerSpawn(playerid)
{
ShowPlayerProgressBar(playerid, Bar0[playerid]);
return 1;
}