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.

Line of sight detection.

Featured Replies

Hello everyone.

I'm still learning C# and am very new to LSPDFR, so I wonder if there is a way to determine whether a nearby ped/vehicle is in my character's line of sight or not. For example if I want to get all game-created vehicles in 100f and make an array of them, can I sort out visible ones?

Edited by Kopalov

On 8.3.2017 at 1:06 AM, Kopalov said:

Hello everyone.

I'm still learning C# and am very new to LSPDFR, so I wonder if there is a way to determine whether a nearby ped/vehicle is in my character's line of sight or not. For example if I want to get all game-created vehicles in 100f and make an array of them, can I sort out visible ones?

 

On 8.3.2017 at 5:44 PM, ToastinYou said:

LOS (Line of Site) natives will do the trick. Here is an example of one;

http://www.dev-c.com/nativedb/func/info/FCDFF7B72D23A1AC#fntrg-fcdff7b72d23a1ac

 

As these are pretty resource hungry, what I do is to check distance first and then use the natives. And also, I perform the check in a seperate gamefiber that waits for 200 ms after every check. That way, from a the player's perspective it is still relatively fluid and realistic while also reducing resource usage by checking only five times per second as opposed to 60.

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.