Problem with my count down function - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with my count down function (
/showthread.php?tid=138966)
Problem with my count down function -
Ben147 - 03.04.2010
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
Re: Problem with my count down function -
Last_Stand_Guardian - 03.04.2010
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; }
|
Re: Problem with my count down function -
Ben147 - 03.04.2010
works thanks