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.

Show HUD Cash when off-duty

Featured Replies

Hello, how could I re-enable HUD elements such as cash when the player is off duty?

 

I've hooked into the onOnDutyChanged event in my plugin as such:
 

public override void Initialize()
{
	Functions.OnOnDutyStateChanged += CashController.OnOnDutyStateChangedHandler;
}

 

and here is what I do in my CashController class:

public static void OnOnDutyStateChangedHandler(bool onDuty)
{
    currentlyOnDuty = onDuty;

    if (!onDuty)
    {
        //The false here is weird, but: https://nativedb.dotindustries.dev/gta5/natives/0x96DEC8D5430208B7
        NativeFunction.Natives.DISPLAY_CASH(false);

        GameFiber cashFiber = GameFiber.StartNew(showCash);
        return;
    }

    NativeFunction.Natives.DISPLAY_CASH(true);
}

private static void showCash()
{
    while (!currentlyOnDuty)
    {
        NativeFunction.Natives.SHOW_HUD_COMPONENT_THIS_FRAME(3);
        GameFiber.Wait(10000);
    }
}

 

Am I missing something, or is the natives I call wrong / incorrectly implemented? The ultimate goal is to be able to see money like you can outside of LSPDFR, with the button Z.
Thank you to anyone reading this!

20 hours ago, byErik said:

see money like you can outside of LSPDFR

There are issues with money in LSPDFR.
The money you see is not really available to your police-avatar, they belong to the game-character that you used as you enter LSPDFR. I have given up on getting GTA-money for my police-avatar, and simply made my own money for LSPDFR

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

  • Author
On 5/12/2024 at 6:51 PM, GTAbear said:

There are issues with money in LSPDFR.
The money you see is not really available to your police-avatar, they belong to the game-character that you used as you enter LSPDFR. I have given up on getting GTA-money for my police-avatar, and simply made my own money for LSPDFR

That's not a problem for me. I'm stuck at the visual presentation of money. I could show it via a menu using RageNativeUI, but I'd rather it be a native preview. That's the part I'm stuck on

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.