Problem with my count down function
#1

i maded count down function but i have a problem
this is my function

Код:
forward CountDown(playerid,cd);
Код:
public CountDown(playerid,cd)
{
 format(cdt,sizeof(cdt),"%d",cd);
 GameTextForPlayer(playerid,cdt,1000,3);
 if(cd>1)
 {
 cd--;
 SetTimerEx("CountDown", 1000, 0, "i", playerid);
 }
return 1;
}
I added it to some command like this

Код:
CountDown(playerid,50);
But it's saw me only the number 50 then 0 then disappear
Reply
#2

Try:
Quote:
Originally Posted by Ben147
pawn Код:
forward CountDown(playerid,cd);
pawn Код:
public CountDown(playerid,cd)
{
 format(cdt,sizeof(cdt),"%d",cd);
 GameTextForPlayer(playerid,cdt,1000,3);
 if(cd>1)
 {
 cd--;
 SetTimerEx("CountDown", 1000, 0, "id", playerid, cd);
 }
return 1;
}
Reply
#3

works thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)