blablabla say !rules to see the rules blabla
Updates/features
- C#
- It PMs users the rules now, don't want this?
Add this to sv_config.ini and change it
- Change rules in addon\rules.txt
- Comes with free bananas
Download
Release2.zip (Size: 2.48 KB / Downloads: 703)
Updates/features
- C#
- It PMs users the rules now, don't want this?
Add this to sv_config.ini and change it
Code:
[RULES]
pm=yes
- Comes with free bananas
CSHARP Code
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Addon;
- using System.IO;
-
- namespace Rules
- {
- public class Rules : CPlugin
- {
- string[] rules = { "" };
- public override void OnServerLoad()
- {
- pm = GetServerCFG("RULES", "pm", "yes");
- rules = File.ReadAllLines("addon\\rules.txt");
- ServerPrint("ohai. Rules v2 loaded");
- }
- string pm = string.Empty;
- public override ChatType OnSay(string Message, ServerClient Client)
- {
- if (Message.StartsWith("!rules"))
- {
- foreach (string rule in rules)
- if (pm == "yes")
- {
- foreach (ServerClient pl in GetClients())
- {
- TellClient(pl.ClientNum, rule, true);
- }
- }
- else
- ServerSay(rule, true);
- return ChatType.ChatNone;
- }
- return ChatType.ChatAll;
- }
- }
- }
Download
Release2.zip (Size: 2.48 KB / Downloads: 703)