SA-MP Forums Archive
How to make this textdraw work - 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: How to make this textdraw work (/showthread.php?tid=600456)



How to make this textdraw work - AgusZ - 08.02.2016

how to make this textdraw counting?




Re: How to make this textdraw work - Sascha - 08.02.2016

Create a timer that calls a callback each second. Create a variable that stores the value of the number currently displayed and then just count up- /downwards with that variable and use "TextDrawSetString" to change the text of the textdraw.

Hint: If you want more specified answered, you will need to post some code and a more specificated question.


Re: How to make this textdraw work - Joron - 08.02.2016

Isnt that fps?


Re: How to make this textdraw work - Sascha - 08.02.2016

Quote:
Originally Posted by Joron
Посмотреть сообщение
Isnt that fps?
Would guess that, too, although from his question and that image I can not say whether he is asking for what I've explained before, or whether how to get that fps "textdraw" shown


Re: How to make this textdraw work - AgusZ - 09.02.2016

Here my script

Код:
//at the top
             new Text:TextdrawLoadTime;
             forward TextdrawLoadTimeString(playerid);

//ongamemodeinit
	TextdrawLoadTime = TextDrawCreate(637.188598, 0.583329, "20");
	TextDrawLetterSize(TextdrawLoadTime, 0.309442, 1.279163);
	TextDrawAlignment(TextdrawLoadTime, 3);
	TextDrawColor(TextdrawLoadTime, 16711935);
	TextDrawSetShadow(TextdrawLoadTime, 0);
	TextDrawSetOutline(TextdrawLoadTime, 1);
	TextDrawBackgroundColor(TextdrawLoadTime, 51);
	TextDrawFont(TextdrawLoadTime, 1);
	TextDrawSetProportional(TextdrawLoadTime, 1);

//code
public TextdrawPlayerOnlineString(playerid)
{
	new string[128];
	format(string, sizeof(string), "%i",/*idontknow*/ );
	TextDrawSetString(Text:TextdrawLoadTime, string);
}]
how to make this textdraw counting from 20 second to 0 second?