SA-MP Forums Archive
[Help] TextDraw Countdown - 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)
+--- Thread: [Help] TextDraw Countdown (/showthread.php?tid=659834)



[Help] TextDraw Countdown - ApolloScripter - 17.10.2018

Someone help me? I have this TextDraw

Код:
TDEditor_TD[2] = TextDrawCreate(7.698852, 261.711273, "000_segundos");
TextDrawLetterSize(TDEditor_TD[2], 0.284999, 1.506664);
TextDrawAlignment(TDEditor_TD[2], 1);
TextDrawColor(TDEditor_TD[2], -1);
TextDrawSetShadow(TDEditor_TD[2], 0);
TextDrawSetOutline(TDEditor_TD[2], 0);
TextDrawBackgroundColor(TDEditor_TD[2], 255);
TextDrawFont(TDEditor_TD[2], 2);
TextDrawSetProportional(TDEditor_TD[2], 1);
TextDrawSetShadow(TDEditor_TD[2], 0);
How do I do a second countdown timer where "000"

The whole process is already done, but could anyone give me a simple example with the following command variables below?

Код:
CMD:countdown (playerid, params[0])

new count;
I would like the count to be what the player will put in command.
thanks in advance.


Re: [Help] TextDraw Countdown - GangstaSunny. - 17.10.2018

PHP код:
//top
new mycountdown[2]
//Command
mycountdown[0] = SetTimer("Countdown"1000true);
mycountdown[1] = strval(param[0]);
//public
mycountdown[1]--;
if(
mycountdown [1] < 1)//Countdown Ende
else
new 
string[24];
format(string,sizeof(string),"%i_segundos",mycountdown [1]);
TextDrawSetString(TDEditor_TD[2], string);
KillTimer(mycountdown[0]); 
Send from my Smartphone