01-12-2012, 22:42
01-14-2012, 23:29
(01-12-2012, 22:42)Yurio Wrote: [ -> ]Yes, new Thread + Thread.Sleep
do you know if this will be implemented?
01-15-2012, 07:34
My mod of the jariz's original plugin (for .NET 3 is not checked):
CSHARP 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"))
- {
- 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);
- }
- }
- }
- }
01-15-2012, 19:22
(01-15-2012, 07:34)Yurio Wrote: [ -> ]My mod of the jariz's original plugin (for .NET 3 is not checked):how do i get this on my server
CSHARP 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")) { 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); } } } }
01-16-2012, 19:17
Camelot
03-14-2012, 23:23
You can write rules in Russian???
03-15-2012, 00: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
Camelot
03-15-2012, 07:21
When I wrote the rules of the game, I have question marks in game!
03-15-2012, 07:55
In that case IDK. Something with the encoding of the file I guess
Camelot
03-15-2012, 08:02
What do?