29.08.2012, 13:24
(
Последний раз редактировалось ThePrograme; 29.08.2012 в 16:59.
)
Can somebody help me to make a countdown which countsdown minutes and seconds and looks like this 1:60 in the server!
SetTimerEx("Countdown", 1000, false, "dd", playerid, 90);
forward Countdown(playerid, time);
public Countdown(playerid, time)
{
time--;
new str[16];
if(time%60)
format(str, 16, "%d:%d0", time/60, time%60);
else
format(str,16,"%d:%d",time/60,time%60);
GameTextForPlayer(playerid, str, 1100, 1);
if(time!=0)
SetTimerEx("Countdown", 1000, false, "dd", playerid, time);
else
{
//Timer is done. Do whatever you need to do.
}
}