SA-MP Forums Archive
Use a textdraw on SetTimerEx - 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: Use a textdraw on SetTimerEx (/showthread.php?tid=58631)



Use a textdraw on SetTimerEx - ZecKo - 20.12.2008

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. :)


Re: Use a textdraw on SetTimerEx - hamptonin - 20.12.2008

Yes it is possible
but what actions


Re: Use a textdraw on SetTimerEx - Donny_k - 20.12.2008

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.


Re: Use a textdraw on SetTimerEx - yom - 20.12.2008

I think he said that its possible to do that:

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

public DestroyTextDraw(textdrawid)
  TextDrawDestroy(textdrawid);



Re: Use a textdraw on SetTimerEx - Donny_k - 20.12.2008

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.


Re: Use a textdraw on SetTimerEx - Seth_Bacon - 11.02.2009

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?




Re: Use a textdraw on SetTimerEx - Jefff - 12.02.2009

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