Update Announcement
Well i was bored so i made this little code which i think will help you as well as plugin users to know if any update arrived so it will be easy for them to update as well as for you also.
CSHARP Code
- using System;
- using System.Collections.Generic;
- using System.Text;
- using Addon;
- using System.Threading;
- using System.Net;
- namespace announcement
- {
- public class announcement : CPlugin
- {
- public void update()
- {
- while (true)
- {
- string current_version = "1.02";
- string str;
- str = client.DownloadString("http://www.yoursite.com/text.txt");
- if (str != current_version)
- ServerSay("your update text", false);
- Thread.Sleep(90000);
- }
- }
- public override void OnServerLoad()
- {
- }
- }
- }
Well hope you guys like it.