31.07.2015, 15:57
It's better to use a TextDraw ![Smiley](images/smilies/smile.png)
Like this:
![Smiley](images/smilies/smile.png)
Like this:
PHP код:
//In the script:
const time = 10; //This would be 10sec
TextDrawShowForPlayer(playerid,txtid); //The countdown starts
@countdown(playerid,time);
//at the end of the script:
@countdown(playerid,x);@countdown(playerid,x) {
if(--x == 0)
{
TextDrawHideForPlayer(playerid,txtid); //Here the countdown ends!
return 1;
}
new str[8];
valstr(str,x);
TextDrawSetString(txtid, str);
TextDrawShowForPlayer(playerid, txtid);
return SetTimerEx(!"@countdown",999,0,!"ii",playerid,x);
}