Use a textdraw on SetTimerEx
#1

Hi, I would now if it is possible to use a fonction who do some actions on a textdraw with a timer, if yes, how ? Please. :)
Reply
#2

Yes it is possible
but what actions
Reply
#3

Pass it - "function[]" is the first argument of the SetTimer(Ex) function(s).

Or do you mean pass a TextDraw ID like - "i", _:textid using SetTimerEx ? Then you have say "TextDrawShowFor...( textid..." in your timer ?

Either way it is possible yes, just pass whatever argument as you usually would as TexDraws are just normal functions like any other.
Reply
#4

I think he said that its possible to do that:

pawn Код:
SetTimerEx("DestroyTextDraw", 1000, true, "i", _:textdrawid);

public DestroyTextDraw(textdrawid)
  TextDrawDestroy(textdrawid);
Reply
#5

Indeed I meant that Yom, the TextDraw function within the custom is just a normal function like always. It's your custom which needs forwarding to the machine not the native inside it, I understand this Alex but thankyou for the pdf line, it's been a while.

I think my first line was a little vague, say you had a custom function which grabbed the time/date etc and stored them in globals then you could have the "function[]" calling this which in turn set the string of the TD to whatever the global was etc.

I don't mean actually pass the TextDrawUseBox function to the 'function[]' argument or some crazy stuff like hehe but reading it back I can see why my first line could have made you think this Alex.
Reply
#6

Hi im having an issue passing a textdraw ID through settimerex:

I've tried

SetTimerEx("TxtDestroy", 25000, false, "i", Textdraw0:textdrawid);

SetTimerEx("TxtDestroy", 25000, 0, "i", Textdraw0);

SetTimerEx("TxtDestroy", 25000, 0, "i", Text:Textdraw0);


But i either get a "tag mismatch" warning or a bad pass to the TxtDestroy f'n. Any ideas?

Reply
#7

Код:
SetTimerEx("TxtDestroy", 25000, 0, "i", _:Textdraw0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)