Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.08 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Windows.Forms;
  5. using System.Runtime.InteropServices;
  6.  
  7. //Add the "addon/dist/addon.dll" as a reference to your project
  8. //Then add "using Addon;" for the namespace
  9. //Documentation is currently being re-written
  10.  
  11. using Addon;
  12.  
  13. namespace plugin_test
  14. {
  15.     //"<class name> : CPlugin" is needed to inherit the functions
  16.     public class plugin_test : CPlugin
  17.     {
  18.         //Example overrides for functions
  19.         public override void OnServerFrame()
  20.         {
  21.         }
  22.  
  23.         public override void OnServerLoad()
  24.         {
  25.         }
  26.  
  27.         public override ChatType OnSay(string Message, ServerClient Client)
  28.         {
  29.             ServerPrint("Player " + Client.Name + " said " + Message);
  30.  
  31.             return ChatType.ChatContinue;
  32.         }
  33.  
  34.         public override string OnCheckBan(string xuid)
  35.         {
  36.             //Return a string if the player is banned
  37.             //otherwise return null
  38.             //xuid = xuid in the "status" command
  39.             return null;
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement