Zone capture textdraw timer help
#4

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
pawn Код:
captureTime++;
So It'd be:
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;
}
Then replace these code:
pawn Код:
ProgBarTimer = SetTimerEx("ProgressbarTimer",15000,false,"i", playerid);
to:
pawn Код:
SetTimerEx("ProgressbarTimer",1000,false,"i", playerid);
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.
Reply


Messages In This Thread
Zone capture textdraw timer help - by SalmaN97 - 18.04.2015, 19:29
Re: Zone capture textdraw timer help - by Ahmad45123 - 18.04.2015, 19:37
Re: Zone capture textdraw timer help - by SalmaN97 - 18.04.2015, 19:44
Re: Zone capture textdraw timer help - by Ahmad45123 - 18.04.2015, 19:46
Re: Zone capture textdraw timer help - by SalmaN97 - 18.04.2015, 19:48
Re: Zone capture textdraw timer help - by SalmaN97 - 18.04.2015, 20:02
Re: Zone capture textdraw timer help - by Ahmad45123 - 18.04.2015, 20:05
Re: Zone capture textdraw timer help - by SalmaN97 - 18.04.2015, 20:08
Re: Zone capture textdraw timer help - by SalmaN97 - 18.04.2015, 20:13
Re: Zone capture textdraw timer help - by Azula - 18.04.2015, 20:13

Forum Jump:


Users browsing this thread: 4 Guest(s)