07-23-2013, 18:38
(07-23-2013, 18:34)8q4s8 Wrote: [ -> ]Did you update the plugin with the code that I posted?
No, I dont know how to update/edit plugins
Will u plz tell me how? or will u edit for me?
(07-23-2013, 18:34)8q4s8 Wrote: [ -> ]Did you update the plugin with the code that I posted?
(07-23-2013, 18:44)8q4s8 Wrote: [ -> ]http://www.itsmods.com/forum/showthread.php?tid=5833
(07-23-2013, 16:28)8q4s8 Wrote: [ -> ]CSHARP Code
using System; using System.Collections.Generic; using Addon; using System.Text; using System.Timers; namespace ClassLibrary1 { public class Class1:CPlugin { int interval; int Messages; int CurrentMSG; public override void OnServerLoad() { Config(); ServerPrint("TimedMessage Plugin by 8Q4S8 loaded!"); } void handler(object s, ElapsedEventArgs e) { if (Messages <= CurrentMSG) { CurrentMSG = 0; } if (MessageList[CurrentMSG] != "!time") { ServerSay(MessageList[CurrentMSG], true); } else { ServerSay("Time (UTC " + TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).TotalHours + "): ^2" + DateTime.Now.ToLongTimeString(), true); } CurrentMSG++; } void Config() { try { interval = int.Parse(GetServerCFG("TimedMSG", "interval", "")); Messages = int.Parse(GetServerCFG("TimedMSG", "Messages", "")); if (Messages != 0) { CurrentMSG = 0; for (int i = 1; i <= Messages; i++) { MessageList.Add(GetServerCFG("TimedMSG", "MSG" + i.ToString(), "")); } } timer.Interval = 1000 * interval; timer.Enabled = true; } catch (Exception e) { ServerPrint(e.Message); } } } }
Edit this string to the colors you like and compile it
CSHARP Code
ServerSay("Time (UTC + " + TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).TotalHours + "): ^2" + DateTime.Now.ToLongTimeString(), true);
then you can use MSG1=!time to show the time.