Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED]How do you make LSPDFR plugins?

Featured Replies

I know I am asking a lot of questions, I have asked like 3 in the last 3 hours but my every question needs a different post. I have already made an LSPDFR callout which has seen successful days and I am glad people like it. While still working on the callouts, I want to learn how to make LSPDFR plugins. I am pretty sure it will be pretty similar to callouts but again, I am not completely sure how similar it will be and how to setup the workspace and what all attachments are needed to make a plugin. I have knowledge in LSPDFR callout C# coding, Unity game engine C# coding, Roblox Lua, and Java and some Python. There are not also videos that I can find that show how to make a plugin. So if you guys have any idea of how to setup a normal plugin workspace or like a simple tutorial, that would be great! Thanks.

 

Edited by PTurtle

GRAY

  • Author
7 minutes ago, Rich said:

Create a non-LSPDFR plugin, then add LSPDFR as a dependency and reference it's API.

Oh alright! Also another question. Do we have to add like a main.cs file just like you do when making callout packs or the plugin only consists of one script? Also the public override void Initialize() is triggered when the plugin is loaded right? How do we make the plugin load only when the player goes on duty? And also what is in the public override void Finally() method? Is there where the plugin's content is? 

 

GRAY

The main file should be called EntryPoint.cs.  You're correct about the Initialize method.  See my screenshot below about the OnOnDutyStateChanged event.  My InitializeFeatures method is what loads my separate plugin features and runs their logic.  The Finally method can be used to clean up anything when your plugin is being unloaded.

 

6e081a403e54566b7621a1b115c50f69.png

Edited by Rich

Released plugins

Rich's Police EnhancementsScene Manager | Rich Ambiance

Retired?

  • Author
10 minutes ago, Rich said:

The main file should be called EntryPoint.cs.  You're correct about the Initialize method.  See my screenshot below about the OnOnDutyStateChanged event.  My InitializeFeatures method is what loads my separate plugin features and runs their logic.  The Finally method can be used to clean up anything when your plugin is being unloaded.

 

6e081a403e54566b7621a1b115c50f69.png

To be honest, this cleared every single doubt from my previous question, and thanks a lot. But I am still kinda confused, where does the main code go where you actually script what the plugin does? 

GRAY

  • Author
1 minute ago, Rich said:

In my example, it would go inside the OnDuty if statement.  Like I said, I abstract this code to a method called InitializeFeatures.

Thanks a lot!! Really clear instructions and that screenie helped a lot! Much love ❤️

 

GRAY

  • The title was changed to [SOLVED]How do you make LSPDFR plugins?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Similar Content

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.