Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using DemoProject.Callouts;
- using LSPD_First_Response.Mod.API;
- using Rage;
- [assembly: Rage.Attributes.Plugin("TESTCALLOUT2", Author = "MINIPUNCH", Description = "BY MINIPUNCH"]
- namespace DemoProject
- {
- /// <summary>
- /// Do not rename! Attributes or inheritance based plugins will follow when the API is more in depth.
- /// </summary>
- internal class Main : Plugin
- {
- /// <summary>
- /// Constructor for the main class, same as the class, do not rename.
- /// </summary>
- public Main()
- {
- }
- /// <summary>
- /// Called when the plugin ends or is terminated to cleanup
- /// </summary>
- public override void Finally()
- {
- }
- /// <summary>
- /// Called when the plugin is first loaded by LSPDFR
- /// </summary>
- public override void Initialize()
- {
- //Event handler for detecting if the player goes on duty
- Functions.OnOnDutyStateChanged += Functions_OnOnDutyStateChanged;
- Game.LogTrivial("TestCallout2 by minipunch loaded!");
- Game.DisplayNotification("TestCallout2 by minipunch loaded!");
- }
- /// <summary>
- /// The event handler mentioned above,
- /// </summary>
- static void Functions_OnOnDutyStateChanged(bool onDuty)
- {
- if (onDuty)
- {
- //If the player goes on duty we need to register our custom callouts
- //Here we register our ExampleCallout class which is inside our Callouts folder (APIExample.Callouts namespace)
- Functions.RegisterCallout(typeof(ChaseCallout));
- Game.LogTrivial("TestCallout2 HAS BEEN LOADED");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement