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

Code:
void thread(object arg) { object[] args = (object[])arg; string msg = (string)args[0]; ServerClient client = (ServerClient)args[1]; int seconds = (int)args[2]; int currsec = 0; while (currsec != seconds) { currsec++; Owner.iPrintLnBold(msg, client); Thread.Sleep(1000); } } void ShowMessage(string msg, ServerClient client, int seconds) { object[] args = { msg, client, seconds }; ThreadPool.QueueUserWorkItem(new WaitCallback(thread), args); }
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 4,041 07-29-2013, 20:14
Last Post: Rendflex
  [Release] nCr and Factorial Functions Yamato 2 3,751 06-18-2013, 17:24
Last Post: Nekochan
  [Release] Random Functions 1.1 Yamato 22 18,207 04-20-2013, 10:13
Last Post: Dominator56
  Help iPrintLnBold HELP! XxBRxX 3 4,515 12-04-2012, 10:33
Last Post: JariZ
  Functions surtek 14 14,685 09-19-2012, 07:57
Last Post: Pozzuh
Information [Solved] Info about functions, events and etc. Nerus 2 3,554 09-09-2012, 20:57
Last Post: surtek
  Seldom required functions Phl3x_ 3 4,305 06-03-2012, 10:53
Last Post: RaZ
  Help I find This functions and i need your help. Bloodfocus 5 5,107 04-23-2012, 01:43
Last Post: House
  [Release] Array functions master131 4 5,248 09-17-2011, 14:23
Last Post: AZUMIKKEL
  [Release] Random Functions Yamato 12 11,790 08-17-2011, 13:07
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

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