Question about textdraw
#1

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.
Reply
#2

Only one gametext can be shown at a time (well, there are a couple of exceptions, but not relevant here).
Reply
#3

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?
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)