26.12.2012, 10:58
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:
and onplayerenterCP
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;
}
pawn Код:
GameTextForPlayer(playerid,"~w~Capturing zone ~r~~h~30 ~w~seconds left",1000,4);
CountdownTimer[playerid] = SetTimerEx("CountDown",1000,true,"i",playerid);