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.

Unload/Reload Callback [Solved]

Featured Replies

Hey guys,

I would like to extend my plugin "Be A Prison Guard". I need a callback, when LSPDFR Reload/Unload my Assembly. 

I tried to solve it with Finally(), but it didnt work.

Any ideas?

 

 

//Edit: All right, have found a solution!

Best regards,

Anarchiyx3

Edited by Anarchiyx3

Yeeeah

54 minutes ago, Anarchiyx3 said:

//Edit: All right, have found a solution!

Might be worth posting here for others that are interested.

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

  • Author

This works for me:

 

private static StaticFinalizer sf;

public override void Initialize()
{
	sf = new StaticFinalizer(delegate {
   		CleanYourScript();
    });
}

public static void CleanYourScript()
{
	//Do your stuff here
	Game.LogTrivial("Be A Prison Guard has been cleaned");
}

 

Edited by Anarchiyx3

Yeeeah

You might simplify the code this way:

private static StaticFinalizer sf;

public override void Initialize()
{
	sf = new StaticFinalizer(CleanYourScript);
}

public static void CleanYourScript()
{
	//Do your stuff here
	Game.LogTrivial("Be A Prison Guard has been cleaned");
}

 

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...

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.