How can i create a countdown
#7

Unirom, unless you don't know how to script, you could've helped the poor man out on Christmas (well in most of the West European countries we have a 1st and a 2nd Christmas day.)

Strier, I recently made such countdown script, I'll find you the code..
on top:
pawn Код:
new delay[MAX_PLAYERS]=30;// capture zone time = 30
new CountDownTimer[MAX_PLAYERS];
pawn Код:
forward CountDown(playerid);
public CountDown(playerid)
{
    new str[128];
    delay[playerid]--;
    format(str,128,"~w~Capturing zone ~r~~h~%d ~w~seconds left",delay[playerid]);
    GameTextForPlayer(playerid,str,1000,4);
    if(delay[playerid] <= 0)
    {
    KillTimer(CountDownTimer[playerid]);
    delay[playerid]=30;
    // do whatever u need to do once player captured the zone
    }
        return 1;
}
and onplayerenterCP
pawn Код:
GameTextForPlayer(playerid,"~w~Capturing zone ~r~~h~30 ~w~seconds left",1000,4);
CountdownTimer[playerid] = SetTimerEx("CountDown",1000,true,"i",playerid);
Reply


Messages In This Thread
SetTimerEx Help - by Strier - 24.12.2012, 02:36
Re: How can i create a countdown - by zDevon - 24.12.2012, 02:50
Respuesta: How can i create a countdown - by Strier - 24.12.2012, 03:24
Respuesta: How can i create a countdown - by Strier - 26.12.2012, 07:51
Respuesta: How can i create a countdown - by Strier - 26.12.2012, 09:07
Re: Respuesta: How can i create a countdown - by Unirom Shaw - 26.12.2012, 09:52
Re: How can i create a countdown - by Mike_Peterson - 26.12.2012, 10:58

Forum Jump:


Users browsing this thread: 2 Guest(s)