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.

AnIdioticMonkey

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    AnIdioticMonkey got a reaction from Stealth22 in Getting the closest set location? [SOLVED]   
    Great, thanks! That's much easier!
  2. Like
    @AnIdioticMonkey
    Add your three locations to a List. Then...
    Vector3 closestPoint = myLocationList.OrderBy(x => x.DistanceTo(Game.LocalPlayer.Character.Position)).FirstOrDefault();
    It'll return the closest Vector3, or null if nothing was found. 
    Edit: I think that's the syntax. I normally code in VB.NET, so my C# is a bit rusty if I don't have Visual Studio in front of me. 
  3. Like
    How are you checking the distance? There's a method which takes a vector3 and gives you the travel distance
  4. Like
    Vector3.traveldistanceto()
  5. Like
    That's one of the common ways to do it. I would test what results you get with Vector3.TravelDistance()
    http://docs.ragepluginhook.net/html/C1AEA24D.htm
    http://docs.ragepluginhook.net/html/FF036733.htm
    I've used it plenty of times and it's always been accurate for me. I had a list of spawn points that I would loop through and check their distance to the LocalPlayer  
  6. Like
    Vector3 pos1 = Game.LocalPlayer.Character.Position.GetOffsetPositionFront(50f); Vector3 pos2 = Game.LocalPlayer.Character.Position.GetOffsetPositionFront(65f); Vector3 pos3 = Game.LocalPlayer.Character.Position.GetOffsetPositionFront(80f); float pos1travel = Game.LocalPlayer.Character.Position.TravelDistanceTo(pos1); float pos2travel = Game.LocalPlayer.Character.Position.TravelDistanceTo(pos2); float pos3travel = Game.LocalPlayer.Character.Position.TravelDistanceTo(pos3); if(pos1travel <= pos2travel && pos1travel <= pos3travel) { //pos1 } else if(pos2travel <= pos1travel && pos2travel <= pos3travel) { //pos2 } else { //pos3 }  
    When you're checking the first distance, you should check it against all available distances (eg, pos2 and pos3). I'd check less than or equal to because if they're equal. Obviously if you have more than a few values to check, this solution wouldn't be the best as it would become very messy to maintain as you add values.
  7. Like
    I highly recommend not using TravelDistance in these kind of checks as it takes into account various path nodes.
    DistanceTo is highly preferred here and is standard.
  8. Like
    blip = new Blip(Entity);
    blip.Color = Color.Whatever;
    blip.EnableRoute(Color.Whatever);
  9. Like
    AnIdioticMonkey reacted to LtFlash in Key Detection Problems   
    Try to insert "break;" after "toAcceptTimer.Enabled = false;" It will stop the while(true) loop so the control will return where it should be.
  10. Like
    AnIdioticMonkey reacted to LtFlash in Key Detection Problems   
    Great to hear it worked!
  11. Like
    AnIdioticMonkey reacted to LtFlash in Key Detection Problems   
    Definitely, it should not happen but I don't see a reason why it is so. You can put the while(true) into new fiber like that:
    GameFiber.StartNew(delegate
                {
                    while (true)
                    {
                         //
                        GameFiber.Yield();
                    }
                }
                );
    and see what happens.

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.