Anmeldungsdatum: Mär 2010
Beiträge: 220
|
Rules plugin v2blablabla 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 TEXT Code: [RULES] pm=yes
- Change rules in addonules.txt - Comes with free bananas TEXT 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\ules.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; } } }
Um Links zu sehen, musst du dich registrieren
|