Hide textdraws - 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: Hide textdraws (
/showthread.php?tid=462805)
Hide textdraws -
Ananisiki - 08.09.2013
^^^^^^^^
Re: Hide textdraws -
[HK]Ryder[AN] - 08.09.2013
Create the textdraw
Display the textdraw in OnPlayerSpawn
Start a timer in OnPlayerSpawn for whatever time you want(5-10 seconds)
Hide the textdraw
Re: Hide textdraws -
doreto - 08.09.2013
pawn Код:
public OnPlayerSpawn(playerid)
{
// called when player spawn
TextDrawHideForPlayer(playerid, textdraw); // replace textdraw with your defined textdraw
// hide textdraw when player spawn
return 1;
}
Re: Hide textdraws -
[HK]Ryder[AN] - 08.09.2013
Quote:
Originally Posted by doreto
pawn Код:
public OnPlayerSpawn(playerid) { // called when player spawn TextDrawHideForPlayer(playerid, textdraw); // replace textdraw with your defined textdraw // hide textdraw when player spawn return 1; }
|
He wants it to show AFTER the player spawns
Re: Hide textdraws -
Lidor124 - 08.09.2013
Try that:
Код:
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, textdraw); // your textdraw
Re: Hide textdraws -
Ananisiki - 08.09.2013
^^^^^^^^
Re: Hide textdraws -
alex9419 - 08.09.2013
You could also use
GameTextForPlayer?
If not, a timer (
SetTimerEx) calling a public function to hide your TextDraw, like so:
Код:
public OnPlayerSpawn(playerid)
{
SetTimerEx("function_name", 5000, false, "i", playerid); // Change 'function_name' to whatever.
}
public function_name(playerid) // Change 'function_name' to whatever.
{
TextDrawHideForPlayer(playerid, your_textdraw); // If global textdraw
PlayerTextDrawHide(playerid, your_playertextdraw); // If player textdraw
}
Re: Hide textdraws -
PrinceKumar - 08.09.2013
If you want that player will able to see where he get spawned and what's the time now thru textdraw then use timer and create two textdraws( 1st for shows time n 2nd for show location) n for location use zonenames or something related to zone name ... I think it will be in ur include files...
Edit:: use them under on playerspawn..
And if you want that textdraw need to be shown for a time limit then use stocks n public function to n settimerex to call these functions ..