Textdraw doesn't appear - 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: Textdraw doesn't appear (
/showthread.php?tid=266289)
Textdraw doesn't appear -
freshOrange - 04.07.2011
Hello again,
I started to use a countdown textdraw, but it starts working only after GMX, but I would like to see it also when the server starts not only after the GMX.
Thanks.
Re: Textdraw doesn't appear -
JaTochNietDan - 04.07.2011
In order to receive help you're going to need to post some code.
Re: Textdraw doesn't appear -
freshOrange - 04.07.2011
I'm using this include.
https://sampforum.blast.hk/showthread.php?tid=91883 v3 ( from pastebin )
Re: Textdraw doesn't appear -
Mean - 04.07.2011
But we'd sure use some code. We aren't telepaths, therefore we can't know what you did.
Re: Textdraw doesn't appear -
freshOrange - 04.07.2011
Thanks to FS, it's enough to add
pawn Код:
TDCountDown(15, 0, 560, 20); // mins, seconds, location, location
TDCDShowForAll();
Under OnGameModeInit ( I guess )
Re: Textdraw doesn't appear -
JaTochNietDan - 04.07.2011
TextDrawShowForAll will only show to players who are currently in the server. So when your server starts then it's not visible to anyone because nobody was in the server when it was called.
I suggest simply using TextDrawShowForPlayer, which in the include you're using is TDCDShowForPlayer, for example:
pawn Код:
public OnPlayerConnect(playerid)
{
TDCDShowForPlayer(playerid);
return 1;
}
I hope that helps!
Re: Textdraw doesn't appear -
freshOrange - 04.07.2011
Won't the countdown start over for every next player?
Re: Textdraw doesn't appear -
JaTochNietDan - 04.07.2011
Quote:
Originally Posted by freshOrange
Won't the countdown start over for every next player?
|
No, that isn't initializing the countdown, that's just making the textdraw show for the player.
Re: Textdraw doesn't appear -
freshOrange - 04.07.2011
Very well! Worked flawlessly, thank you.
Also I will take in mind your guide in signature.