Destroying textdraws created in other public
#1

Hello,

I'm creating a textdraw in a public

Код:
public OnPlayerEnterCheckpoint(playerid)
{
   new Text:InformationText = TextDrawCreate( 200.0, 385.0, "STAY HERE 60 SECONDS" );
   SetTimerEx(playerid, NANA,ture,60000 ); // timer
and now, I want to destroy it in another public - when some1 leave chceckpoint before the timer get to 60 seconds. what shall I do ? I need to create as I'd have 2 many texts!

I was thinking about DestoryAllTextdraws, however I've got 2 textdraws I want to stay
Reply
#2

pawn Код:
TextDrawDestroy(Text);
use this in the other public
Reply
#3

Won't work.
Create the variable outside any callback or function and then attach it to the new textdraw.
Reply
#4

Quote:
Originally Posted by Flyfishes
Посмотреть сообщение
Won't work.
Create the variable outside any callback or function and then attach it to the new textdraw.
true..
Reply
#5

lol Pharrel good man yourself ....
Flyfishes yeah I was thinking about it but how? I Don't know how to attach it

New T1; on the top ofc
and then what?
T1 = new Text:InformationText - This 1 won't work
Reply
#6

Create it outside any public.
Let's say you created the variable; textdraw
Then to attach it do; textdraw = createtextdraw bla bla
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)