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.

Vector3Extension.Around() question

Featured Replies

I made my Around() function and I compared it with the LSPDFR Around() function spawning 100 peds with the same radius(10f) and this is the result:YyhTUTj.png

The cops at the left is using the LSPDFR Around() function that @LMS posted and the marines at the right is using my function. So my question is, there is a reason why the LSPDFR team decided that way of doing it?

 

Also here is my code:

 

public static Vector3 AroundPosition(this Vector3 v3, float radius)
{
   return v3 = v3 + new Vector3(MathHelper.GetRandomSingle(-radius, radius), MathHelper.GetRandomSingle(-radius, radius), 0.0f);
}

Edited by alexguirre

  • Management Team

It's just that you have a random distribution between 0 and radius, while my function guarantees to return a position away radius meters from the origin. This is mostly because we randomize the radius before calling the function (also often preserving a required minimum distance).

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

  • 5 weeks later...
  • Management Team

You simple pass a floating point value as radius that is higher than your minimum. We randomize before the call/have a helper call to do minimum and maximum logic. The function itself has no limits.

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

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.