SA-MP Forums Archive
Text-Draw Help - 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: Text-Draw Help (/showthread.php?tid=610142)



Text-Draw Help - CarRamper - 20.06.2016

Hello Guys Please Help Me To code such a thing that will hide/destory Text Draw After 10 seconds


Re: Text-Draw Help - Matz - 20.06.2016

Code:
new
	Text:SomeTextdrv
;

//ongamemodeinit
SomeTextdrv = TextDrawCreate(263.000000, 312.000000, "_");
TextDrawBackgroundColor(SomeTextdrv, 255);
TextDrawFont(SomeTextdrv, 1);
TextDrawLetterSize(SomeTextdrv, 0.899999, 5.699999);
TextDrawColor(SomeTextdrv, -1);
TextDrawSetOutline(SomeTextdrv, 0);
TextDrawSetProportional(SomeTextdrv, 1);
TextDrawSetShadow(SomeTextdrv, 1);
TextDrawUseBox(SomeTextdrv, 1);
TextDrawBoxColor(SomeTextdrv, 100);
TextDrawTextSize(SomeTextdrv, 378.000000, 50.000000);
TextDrawSetSelectable(SomeTextdrv, 0);

//to be used somewhere
TextDrawShowForPlayer(playerid, SomeTextdrv);
SetTimerEx("HideIt",10000,0,"i",playerid); //hide it after 10 seconds

forward HideIt(playerid);
public HideIt(playerid)
{
TextDrawHideForPlayer(playerid, SomeTextdrv);
return 1;
}