Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Functions iPrintLnBold()
#1
Help please with the function.

Example:
iPrintLnBold(null, "^5iprintlnbold test!");

What can I do to show the text on the screen for 5 seconds?
Reply

#2
You can't
Or you call it twice or something and wait a few seconds between the 2, but you can't change the time of the message
Reply

#3
iPrintLnBold("^5iprintlnbold test!", null);
Thread.sleep(1000);
iPrintLnBold("^5iprintlnbold test!", null);
Thread.sleep(1000);
iPrintLnBold("^5iprintlnbold test!", null);
Thread.sleep(1000);
iPrintLnBold("^5iprintlnbold test!", null);
Thread.sleep(1000);
iPrintLnBold("^5iprintlnbold test!", null);

but its best practice to only use sleeps in seperate threads!
Had a life, Got a modem..
Reply

#4
Thank you for your answers
Reply

#5
@pieter If you're gonna do it, at least do it right Troll

CSHARP Code
  1. void thread(object arg)
  2. {
  3. object[] args = (object[])arg;
  4. string msg = (string)args[0];
  5. ServerClient client = (ServerClient)args[1];
  6. int seconds = (int)args[2];
  7.  
  8. int currsec = 0;
  9. while (currsec != seconds)
  10. {
  11. currsec++;
  12. Owner.iPrintLnBold(msg, client);
  13. Thread.Sleep(1000);
  14. }
  15. }
  16.  
  17. void ShowMessage(string msg, ServerClient client, int seconds)
  18. {
  19. object[] args = { msg, client, seconds };
  20. ThreadPool.QueueUserWorkItem(new WaitCallback(thread), args);
  21. }
Reply

#6
thank you JariZ!!!!
Reply

#7
@litgar Remove the 'Owner.' part before iPrintLnBold (line 12), forgot that only RollTheDice uses Owner
Reply

#8
(04-16-2012, 08:42)JariZ Wrote: @litgar Remove the 'Owner.' part before iPrintLnBold (line 12), forgot that only RollTheDice uses Owner

ok! Smile
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Matrix Functions Yamato 1 2,769 07-29-2013, 20:14
Last Post: Rendflex
  [Release] nCr and Factorial Functions Yamato 2 2,691 06-18-2013, 17:24
Last Post: Nekochan
  [Release] Random Functions 1.1 Yamato 22 13,368 04-20-2013, 10:13
Last Post: Dominator56
  Help iPrintLnBold HELP! XxBRxX 3 3,594 12-04-2012, 10:33
Last Post: JariZ
  Functions surtek 14 11,302 09-19-2012, 07:57
Last Post: Pozzuh
Information [Solved] Info about functions, events and etc. Nerus 2 2,498 09-09-2012, 20:57
Last Post: surtek
  Seldom required functions Phl3x_ 3 3,184 06-03-2012, 10:53
Last Post: RaZ
  Help I find This functions and i need your help. Bloodfocus 5 3,855 04-23-2012, 01:43
Last Post: House
  [Release] Array functions master131 4 3,709 09-17-2011, 14:23
Last Post: AZUMIKKEL
  [Release] Random Functions Yamato 12 8,456 08-17-2011, 13:07
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.