Do you also want these plugins?
Yes
62.50%
5
No
37.50%
3
8 vote(s)
* You voted for this item. [Show Results]

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Request] Need Time Plugin and Server Msg Plugin
#11
(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 Confused
Will u plz tell me how? or will u edit for me?
  Reply
#12
http://www.itsmods.com/forum/showthread.php?tid=5833
  Reply
#13
(07-23-2013, 18:44)8q4s8 Wrote: http://www.itsmods.com/forum/showthread.php?tid=5833

I dont have Microsoft Visual plz edit this string Undecided
  Reply
#14
get the Plugin Maker from: @SailorMoon
that works to create simple plugins, or download Microsoft Visual Studio
  Reply
#15
(07-23-2013, 16:28)8q4s8 Wrote:
CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using Addon;
  4. using System.Text;
  5. using System.Timers;
  6.  
  7. namespace ClassLibrary1
  8. {
  9. public class Class1:CPlugin
  10. {
  11. List<string> MessageList = new List<string>();
  12. Timer timer = new Timer();
  13. int interval;
  14. int Messages;
  15. int CurrentMSG;
  16.  
  17. public override void OnServerLoad()
  18. {
  19. Config();
  20. ServerPrint("TimedMessage Plugin by 8Q4S8 loaded!");
  21. }
  22. void handler(object s, ElapsedEventArgs e)
  23. {
  24. if (Messages <= CurrentMSG)
  25. {
  26. CurrentMSG = 0;
  27. }
  28. if (MessageList[CurrentMSG] != "!time")
  29. {
  30. ServerSay(MessageList[CurrentMSG], true);
  31. }
  32. else
  33. {
  34. ServerSay("Time (UTC " + TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).TotalHours + "): ^2" + DateTime.Now.ToLongTimeString(), true);
  35. }
  36.  
  37. CurrentMSG++;
  38. }
  39. void Config()
  40. {
  41. try
  42. {
  43. interval = int.Parse(GetServerCFG("TimedMSG", "interval", ""));
  44. Messages = int.Parse(GetServerCFG("TimedMSG", "Messages", ""));
  45.  
  46. if (Messages != 0)
  47. {
  48. CurrentMSG = 0;
  49. for (int i = 1; i <= Messages; i++)
  50. {
  51. MessageList.Add(GetServerCFG("TimedMSG", "MSG" + i.ToString(), ""));
  52. }
  53. }
  54. timer.Interval = 1000 * interval;
  55. timer.Elapsed += new ElapsedEventHandler(handler);
  56. timer.Enabled = true;
  57.  
  58.  
  59. }
  60. catch (Exception e)
  61. {
  62. ServerPrint(e.Message);
  63. }
  64. }
  65. }
  66. }


Edit this string to the colors you like and compile it
CSHARP Code
  1. ServerSay("Time (UTC + " + TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).TotalHours + "): ^2" + DateTime.Now.ToLongTimeString(), true);


then you can use MSG1=!time to show the time.

Thanks it works, Compiled using SailorMoon Plugin Maker 4.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Windows 8.1 Fix for MW3 Server Addon master131 16 16,914 09-29-2014, 23:08
Last Post: SuperNovaAO
Brick [Release] MW3 Server Administration Addon iRoNinja 5 8,513 11-10-2013, 15:46
Last Post: Casper
Exclamation Help cmdlist, dvarlist server crash Nerus 17 10,893 11-09-2013, 23:54
Last Post: Nerus
Wink Plugin with !ban !kick and !tampban clemi555 3 3,871 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 4,328 11-08-2013, 19:13
Last Post: clemi555
  Our Level Fastfile is Different from the Server. CheeseToast 6 10,515 11-03-2013, 17:52
Last Post: CheeseToast
  Dedicated Server External (public) IP Nerus 3 5,546 11-02-2013, 14:16
Last Post: Casper
  [Release] Bunker Plugin 1.3 archit 68 38,038 10-30-2013, 11:59
Last Post: clacki
  MW3 Server Version superg1973 7 12,002 10-28-2013, 01:15
Last Post: kotyra972
  Help Modifying plugin maverigh 5 5,230 10-19-2013, 10:29
Last Post: Nekochan

Forum Jump:


Users browsing this thread: 1 Guest(s)