Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- using FcCore.Engine;
- using FcCore.Subspace;
- using FcCore.Subspace.Modules;
- namespace FcCore.Fc.Modules
- {
- public class HelloWorld : IFcEngineModule
- {
- IArena arena; //Arena module holder
- IChat chat; //Chat module holder
- //Called when the engine loads the module
- //Return true if this module can be loaded successfully otherwise false.
- bool IFcEngineModule.OnLoad(IFcEngineHook engineHook)
- {
- if (engineHook.AttachModule<IArena>(out arena))
- //Event ArenaEntered hookup
- arena.ArenaEntered += new ArenaEnteredHandle(arena_ArenaEntered);
- if (engineHook.AttachModule<IChat>(out chat))
- return true;
- return true;
- }
- //Called when the engine unloads the module
- //Return true if this module can be unloads successfully otherwise false.
- bool IFcEngineModule.OnUnload(IFcEngineHook enghineHook)
- {
- return true;
- }
- void arena_ArenaEntered(object sender, ushort playerId)
- {
- chat.SendPublic("Hello World!", SoundType.Fart);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement