Release Rules plugin v2
#11
Yes, new Thread + Thread.Sleep
Reply

#12
(01-12-2012, 22:42)Yurio Wrote: Yes, new Thread + Thread.Sleep

do you know if this will be implemented?

Reply

#13
My mod of the jariz's original plugin (for .NET 3 is not checked):

Code:
using System.IO; using System.Threading; using Addon; namespace Rules { public class Rules : CPlugin { string[] rules = { "" }; public override void OnServerLoad() { rules = File.ReadAllLines("addon\\rules.txt"); ServerPrint("Rules plugin"); } public override ChatType OnSay(string Message, ServerClient Client) { ServerPrint(Client.Name + ": " + Message); if (Message.StartsWith("!cmd")) { Thread shru = new Thread(ShowRules); shru.Start(Client); return ChatType.ChatNone; } return ChatType.ChatGame; } private void ShowRules(object cli) { ServerClient sc = (ServerClient)cli; foreach (string rule in rules) { Thread.Sleep(1000); TellClient(sc.ClientNum, "[^1PM^7]: " + rule, true); ServerPrint("console to " + sc.Name + ": " + "[^1PM^7]: " + rule); } } } }
Reply

#14
(01-15-2012, 07:34)Yurio Wrote: My mod of the jariz's original plugin (for .NET 3 is not checked):

Code:
using System.IO; using System.Threading; using Addon; namespace Rules { public class Rules : CPlugin { string[] rules = { "" }; public override void OnServerLoad() { rules = File.ReadAllLines("addon\\rules.txt"); ServerPrint("Rules plugin"); } public override ChatType OnSay(string Message, ServerClient Client) { ServerPrint(Client.Name + ": " + Message); if (Message.StartsWith("!cmd")) { Thread shru = new Thread(ShowRules); shru.Start(Client); return ChatType.ChatNone; } return ChatType.ChatGame; } private void ShowRules(object cli) { ServerClient sc = (ServerClient)cli; foreach (string rule in rules) { Thread.Sleep(1000); TellClient(sc.ClientNum, "[^1PM^7]: " + rule, true); ServerPrint("console to " + sc.Name + ": " + "[^1PM^7]: " + rule); } } } }
how do i get this on my server
Reply

#15
@Cprl.Rst someone has to complie the code to dll file
@Yurio Good job but messages pop up too fast,hard to read it
Reply

#16
You can write rules in Russian???
Reply

#17
@camelot if you had actually read the thread you could see that rules can be edited and added yourself. So yes, in Russian as well
Reply

#18
When I wrote the rules of the game, I have question marks in game!
Reply

#19
In that case IDK. Something with the encoding of the file I guess
Reply

#20
What do?
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 6,490 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 7,585 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 55,804 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 7,641 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 8,292 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 82,007 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 25,156 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 3,653 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 44,646 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 3,972 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

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