18.04.2015, 19:46
Ok, You are using it wrong.
1) First create a variable call it lets say: captureTime.
2) Create a 1-second timer and add that same code you have in the ProgressbarTimer timer.
3) Add in the end
So It'd be:
Then replace these code:
to:
And you can delete the ProgBar variable btw.
E: And also, You have your brackets wrong... I fixed them... Look at the code I provided.
E2: You can use progress bars include here: https://sampforum.blast.hk/showthread.php?tid=537468
Its better for this type of stuff.
1) First create a variable call it lets say: captureTime.
2) Create a 1-second timer and add that same code you have in the ProgressbarTimer timer.
3) Add in the end
pawn Код:
captureTime++;
pawn Код:
new captureTime= 0;
public ProgressbarTimer(playerid)
{
captureTime++;
if(captureTime== 1000)
{
TextDrawSetString(zProgBar, l);
}
else if(captureTime== 2000)
{
TextDrawSetString(zProgBar, ll);
}
else if(captureTime== 3000)
{
TextDrawSetString(zProgBar, lll);
}
else if(captureTime== 4000)
{
TextDrawSetString(zProgBar, llll);
}
else if(captureTime == 5000)
{
TextDrawSetString(zProgBar, lllll);
}
else if(captureTime== 6000)
{
TextDrawSetString(zProgBar, llllll);
}
else if(captureTime== 7000)
{
TextDrawSetString(zProgBar, lllllll);
}
else if(captureTime== 8000)
{
TextDrawSetString(zProgBar, llllllll);
}
else if(captureTime== 9000)
{
TextDrawSetString(zProgBar, llllllllll);
}
else if(captureTime== 10000)
{
TextDrawSetString(zProgBar, lllllllllll);
}
else if(captureTime== 11000)
{
TextDrawSetString(zProgBar, lllllllllll);
}
else if(captureTime== 12000)
{
TextDrawSetString(zProgBar, llllllllllll);
}
else if(captureTime== 13000)
{
TextDrawSetString(zProgBar, lllllllllllll);
}
else if(captureTime== 14000)
{
TextDrawSetString(zProgBar, llllllllllllll);
}
else if(captureTime== 15000)
{
TextDrawSetString(zProgBar, llllllllllllll);
//You can delete the other time you have there and just put the code you want to happen here.
}
return 1;
}
pawn Код:
ProgBarTimer = SetTimerEx("ProgressbarTimer",15000,false,"i", playerid);
pawn Код:
SetTimerEx("ProgressbarTimer",1000,false,"i", playerid);
E: And also, You have your brackets wrong... I fixed them... Look at the code I provided.
E2: You can use progress bars include here: https://sampforum.blast.hk/showthread.php?tid=537468
Its better for this type of stuff.