Question about textdraw - 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: Question about textdraw (
/showthread.php?tid=501007)
Question about textdraw -
Ananisiki - 16.03.2014
I have a command there you type a text so it announces to all players (middle of the screen)
I made a player announce from that too, so now i have two announce commands, one for everyone and one for one specific player (warn him if he breaks the rules and so)
so,
if i type /ann hi everyone, it shows up (it has a timer on for like 5 seconds, so i have enough time to type the other announce command)
as i said, if i type /ann hi everyone and right after that /playerannounce nick / id hello there
the /ann hi everyone (that one that shows for everyone) disappears, why this?
PS, it has the same screen position, both of them.
Re: Question about textdraw -
MP2 - 16.03.2014
Only one gametext can be shown at a time (well, there are a couple of exceptions, but not relevant here).
Re: Question about textdraw -
Ananisiki - 16.03.2014
Im glad that you understood what i said, hehe, a bit messy bit..
The stuff i show is a textdraw, not a gametext, can the textdraw be shown one at a time?
Re: Question about textdraw -
MythicalMarauder - 16.03.2014
Yes.
You can destroy it under OnPlayerConnect.
And if you want to make a command, put TextDrawShowForAll and use a timer for it.
Example
pawn Код:
public OnPlayerConnect(playerid)
{
TextDrawDestroy(Textdraw1); //Replace with your textdraw name
return 1;
}
//------------
CMD:txtforall(playerid, params[])
{
TextDrawShowForAll(Textdraw1); //Change with your textdraw name^^
SetTimer("Textdraw1", 10000, false); //10000 = 10 seconds.
return 1;
}
Untested.