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] detecting door type

Featured Replies

Hello Community,

 

i tried to figure out how to detect door types (is it a passenger door or a trunk or a hood)

but i cant figure out wich door is from which type since cars can have a different number of doors.

 

for Example:

Gruppe 6 vans have 1,2,3,4 passenger doors and number 5 is the hood.

but a car with only 2 passenger doors and 1 trunk or hood, that means

the index of these doors is variating from vehicle to vehicle.

even if i detect the passenger seats i cannot see if the vehicle have just a tunk or just a hood or both or none. (2²)

 

so how can i detect the doortype?

 

@LMS

Your M-key Menu is able to open and close specific doors.

How do you detect the doors?

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Doors are stored in an array.

Use myVehicle.Doors[1] to retrieve each door (replace 1 with the integer you need)

 

You can then add each integer to an enum for easy naming if you need it.

 

In terms of "detecting" which door is which, the integer never changes so a 2 door car will cause an exception if the index doesn't exist. Simply catch that to determine if its a 2 door, 4 door etc.

 

I know RPH has some implementation for VehicleDoor's but the documentation isn't complete on the website and I've personally never used it.

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

  • Author
30 minutes ago, LukeD said:

Doors are stored in an array.

Use myVehicle.Doors[1] to retrieve each door (replace 1 with the integer you need)

 

You can then add each integer to an enum for easy naming if you need it.

 

In terms of "detecting" which door is which, the integer never changes so a 2 door car will cause an exception if the index doesn't exist. Simply catch that to determine if its a 2 door, 4 door etc.

 

I know RPH has some implementation for VehicleDoor's but the documentation isn't complete on the website and I've personally never used it.

 

My Fault.

I just checked it again.

 

when i checked it the last time i tough that if 

for Example:

backseat doors 3 and 4 do not exist the game would stack the array like that   0(driver), 1(passenger), 2(hood), 3(trunk)

but they don't

if backseat doors 3 and 4 do not exist the game just leave the array like that    0(driver), 1(passenger), 4(hood), 5(trunk)

 

ok that changes everything.

thanks

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

  • The title was changed to [Solved] detecting door type

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.