Thread Rating:
  • 3 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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]

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Addon;
  6. using System.IO;
  7.  
  8. namespace Rules
  9. {
  10. public class Rules : CPlugin
  11. {
  12. string[] rules = { "" };
  13. public override void OnServerLoad()
  14. {
  15. pm = GetServerCFG("RULES", "pm", "yes");
  16. rules = File.ReadAllLines("addon\\rules.txt");
  17. ServerPrint("ohai. Rules v2 loaded");
  18. }
  19. string pm = string.Empty;
  20. public override ChatType OnSay(string Message, ServerClient Client)
  21. {
  22. if (Message.StartsWith("!rules"))
  23. {
  24. foreach (string rule in rules)
  25. if (pm == "yes")
  26. {
  27. foreach (ServerClient pl in GetClients())
  28. {
  29. TellClient(pl.ClientNum, rule, true);
  30. }
  31. }
  32. else
  33. ServerSay(rule, true);
  34. return ChatType.ChatNone;
  35. }
  36. return ChatType.ChatAll;
  37. }
  38. }
  39. }


Download

.zip   Release2.zip (Size: 2.48 KB / Downloads: 703)
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 4,194 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 4,786 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 41,928 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 5,724 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 5,240 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 62,817 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 18,763 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 2,727 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 33,476 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 3,084 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

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