-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.cs
37 lines (33 loc) · 1.21 KB
/
Main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System.Reflection;
using LSPD_First_Response.Mod.API;
using Rage;
using ExampleEvents.Events;
using SuperEvents.EventFunctions;
namespace ExampleEvents
{
public class Main : Plugin
{
public override void Initialize()
{
Functions.OnOnDutyStateChanged += OnOnDutyStateChangedHandler;
}
private static void OnOnDutyStateChangedHandler(bool onDuty)
{
if (onDuty)
{
RegisterEvents();
Game.DisplayNotification("3dtextures", "mpgroundlogo_cops", "~r~ExampleEvents", "~g~Plugin Loaded.",
"ExampleEvents version: " + Assembly.GetExecutingAssembly().GetName().Version + " loaded.");
}
}
private static void RegisterEvents()
{
EventManager.RegisterEvent(typeof(ExampleFight), EventManager.Priority.Low); //You can set the priority of events here, Low, Normal, High
EventManager.RegisterEvent(typeof(ExampleSimple)); //If you dont specify priority, it defaults to "normal"
}
public override void Finally()
{
Game.LogTrivial("ExampleEvents by SuperPyroManiac has been cleaned up.");
}
}
}