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.

Supporting Xbox Controller in plugin?

Featured Replies

Does anybody know how to do this? I'm looking to start with just being able to read input from a controller. Are there any examples anywhere to follow? Is this supported with rage alone or do I need more references? Any push in the right direction is appreciated. 

19 hours ago, DMes71 said:

Does anybody know how to do this? I'm looking to start with just being able to read input from a controller. Are there any examples anywhere to follow? Is this supported with rage alone or do I need more references? Any push in the right direction is appreciated. 

Game.IsControllerButtonDown() and the ControllerButtons enum should get you a long way :smile:

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
2 hours ago, Albo1125 said:

Game.IsControllerButtonDown() and the ControllerButtons enum should get you a long way :smile:

I'll have to keep messing with it, but it doesn't seem to work.  I can't ever get IsControllerButtonDown() to return as true when I'm holding a button down.

15 hours ago, DMes71 said:

I'll have to keep messing with it, but it doesn't seem to work.  I can't ever get IsControllerButtonDown() to return as true when I'm holding a button down.

Make sure to use a while loop to constantly listen for Button press events 

  • Author
On 2/7/2016 at 4:16 AM, tanu1215 said:

Make sure to use a while loop to constantly listen for Button press events 

Thanks for the reply.

It's in a loop the code looks something like this:

while (true)
            {
                

                if (Game.IsKeyDown(Keys.E) || Game.IsControllerButtonDown(Rage.ControllerButtons.A))
                {
                    if (((Ped)GetAimedEntity()).Exists() && ((Ped)GetAimedEntity()).IsValid() 
                        && (((Ped)GetAimedEntity()).DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront * 0f))) <= 5f)
                    {}
                                                                                                                                               
           }

I know the loop is working because the if statement passes if I press E.

  • 2 weeks later...

Game.IsControllerButtonDown() will work first time the controller button is pressed, Game.IsControllerButtonDownRightNow() will return true while its held down

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.