SA-MP Forums Archive
Text draw only for some seconds - 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: Text draw only for some seconds (/showthread.php?tid=75341)



Text draw only for some seconds - veskosid - 01.05.2009

Hi all guys i have text draw on my server but text draw is destroyed when i spawn the player i want when i connect to i see text draw only for 5 seconds and then destroy.May be i must use a timers and other things
Help me guys




Re: Text draw only for some seconds - *ToM* - 01.05.2009

If you want to use the texdraw only for 5 second, why not to use GameTextForPlayer ?


Re: Text draw only for some seconds - veskosid - 02.05.2009

Yeah but i want to know how to make it for 5 seconds


Re: Text draw only for some seconds - HB - 02.05.2009

On OnPlayerConnect you enable the Textdraw, and set a timer for the player (SetTimerEx). In the public you hide the textdraw again. Thats basicly everything you should do.

Note: Textdraw has a small bug in it sometimes, read this for more information.


Re: Text draw only for some seconds - veskosid - 05.05.2009

Can you give me the code for some text draw for example please ?


Re: Text draw only for some seconds - SpiderPork - 05.05.2009

pawn Код:
// Defines
new Text:Textdraw;

// OnGameModeInit
// Add the textdraw create shizzle here

// Somewhere where you want your textdraw to be shown
TextDrawShowForPlayer(playerid, Textdraw);
SetTimerEx("TextdrawHide", 5000, 0, "i", playerid);

// On the end of your script
forward TextdrawHide(playerid);
public TextdrawHide(playerid)
{
    TextDrawHideForPlayer(playerid, Textdraw);
}
Just an example.


Re: Text draw only for some seconds - veskosid - 05.05.2009

Ok man thank you but i do all and the text dont destroy sorry i m noob scripter but i want some example for the timer please make the timer to show the text only for 3/4 seconds ALREADY THANKS


Re: Text draw only for some seconds - veskosid - 05.05.2009

?


Re: Text draw only for some seconds - SpiderPork - 05.05.2009

SetTimerEx("TextdrawHide", 5000, 0, "i", playerid);
Change the milliseconds number ^^.


Re: Text draw only for some seconds - veskosid - 05.05.2009

Thank you friend finally it works