Release Rules plugin v2
#1
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
Code:
[RULES] pm=yes
- Change rules in addon\rules.txt
- Comes with free bananas

[Image: 834vg.png]

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

.zip   Release2.zip (Size: 2.48 KB / Downloads: 723)
Reply

#2
@ jariz, has forgotten to add?
cg_chatHeight "8"
cg_chatTime "30000"
Reply

#3
Hi
Rules shows only the last 3 lines
[Image: b_560_95_1.png]
Reply

#4
@makavel It should display at least 4 lines
Reply

#5
Only shows 2 lines for me and anyone else that uses it
[Image: jace.png]
Reply

#6
Not possible
Reply

#7
Yes displays the 4 last lines of the rules but only if nothing is displayed in the say.
You can do so rules shown a without limit line.
[Image: b_560_95_1.png]
Reply

#8
There's a setting in your cfg for this.
[Image: lQDUjba.jpg]
Reply

#9
Updated plugin to work with nukem's update which fucked up all plugins again
Reply

#10
is it possible to make so that each line is pm'd is time delayed?
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.