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.

[solved]AddMinimumDistanceCheck & minimumDistance difference?

Featured Replies

i'm confused between the 2, with mininumDistance i mean:                                                                         ⬇️Minimum distance.

SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(300, 800));

 

and:

AddMinimumDistanceCheck(20f, SpawnPoint);

Never changed AddMinimumDistanceCheck since i found no reason to do so for it.

Edited by Faya

🇳🇱

They are two different things: the first spawns a certain situation (for example a call) near the road (like a sidewalk), while the second is used to indicate a minimum limit with respect to your position in which to spawn a specific circumstance (example of that  previous one)

  • Management Team

The first one changes you spawn point to a (street) position between 300-800 meters around the player.

The second on ensures the player is at least 20 meters away upon accepting the callout, automatically disregarding it if closer.

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

  • The title was changed to [solved]AddMinimumDistanceCheck & minimumDistance difference?
On 11/19/2020 at 7:57 PM, LMS said:

The first one changes you spawn point to a (street) position between 300-800 meters around the player.

The second on ensures the player is at least 20 meters away upon accepting the callout, automatically disregarding it if closer.

I think the first one is bugged. Whenever I use that one the Callout still spawns super close (like around 50m away from the player), no matter which values I enter

  • Management Team
2 hours ago, RicardaHub said:

I think the first one is bugged. Whenever I use that one the Callout still spawns super close (like around 50m away from the player), no matter which values I enter

 

Have you logged/blipped the positions it is returning to verify whether it is returning bad values? The code above should work fine.

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

1 hour ago, LMS said:

 

Have you logged/blipped the positions it is returning to verify whether it is returning bad values? The code above should work fine.

Yeah I've set a random spawn location using the function above and added a Blip to that chosen location. It's always near me. Even if I put 500f, 1000f it would still spawn what seems like 10m away from me

 

Example:

 

SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(300f, 500f));
...
Car = new Vehicle(SpawnPoint);
SpawnBlip = Car.AttachBlip();

Using that, my Callout still only spawns a few meters away from me

On 11/23/2020 at 5:28 PM, LMS said:

Not sure what is going on, that definitely works fine for me. Maybe the street function only considers very close nodes for whatever reason.

I tried it again with 50f, 100f, 150f but all of those still spawn way too close.

 

I used that function to spawn a car 50f ... around me, however when it is actually called the car spawns right beside me 99% of the time

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.