OldSchoolHack

Registrieren / Anmelden Deutsch

[MW3] Server Addons [Update 08.02.2012]

icon Thema: [MW3] Server Addons [Update 08.02.2012]

Anmeldungsdatum: Mär 2010

Beiträge: 220

Rules plugin v2

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

TEXT Code:
  1. [RULES]
  2. pm=yes

- Change rules in addonules.txt
- Comes with free bananas

http://i.imgur.com/834vg.png

TEXT 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\ules.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. }

http://www.abload.de/img/download_buttoncouux.png

Um Links zu sehen, musst du dich registrieren


http://no-haking.square7.ch/images/wbb3-header-logo.png


__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png