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.

Plugin Development: Main()

Featured Replies

Hi everyone,

As someone who isn't new to C#, but is new to plugin dev, it seems like if I run my code loop through Main(), it will hog the whole of  LSPDFR will halt, or if I have my code loop through OnOnDutyStateChanged it works, however when I force start duty (jump + F9) it seems to have really weird side effects to LSPDFR. Is there something I'm missing or perhaps I am forgetting something really simple? I can get my code to work, it's just that when accepting a callout, the flashing radius blip won't update to the 'enemy', thus kind of halting everything anyway.

Thanks everyone in advance

  • Management Team

Do you make sure to return execution via GameFiber.Yield or GameFiber.Sleep? Because all native invocations have to be synced with the game's scripting engine, there is no real multithreading and threads must return control each tick.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

  • 3 weeks later...

How exactly do you make a plugin? Is there an  API example of a plugin (similar to the one available for callouts) that loads when you go on duty, that constantly checks for button pushes so that I could write a script that toggles based on a button push?

Edited by download500

16 minutes ago, download500 said:

How exactly do you make a plugin? Is there an  API example of a plugin (similar to the one available for callouts) that loads when you go on duty, that constantly checks for button pushes so that I could write a script that toggles based on a button push?

Check out the vehicle indicators SDK example. That should give you help.

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.