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.
The latest updated version of RAGE Plugin Hook, required to play LSPDFR, can be found inside the LSPDFR download. It is not currently available on the RAGE Plugin Hook website.

[Addon Vehicles][Scripting][Solved]Make add-on police cars work in LSPDFR

Featured Replies

I have a custom pack that I've made which contains various add-on vehicles. My question is, what is required to make AI recognize your vehicle as a police car in order to initiate pullovers? In my meta files, I have the following settings:
 - Vehicles.meta has the flags FLAG_LAW_ENFORCEMENT and FLAG_EMERGENCY_SERVICE set for each vehicle
 - Carvariations.meta has <lightSettings value="1" /> and <sirenSettings value="1" /> for each vehicle as well
I also have replaced the vanilla vehicles and they are able to initiate pullovers just fine. Is there something I am missing?

EDIT: I've also confirmed through the RPH console using "Get Game.LocalPlayer.Character.IsInAnyPoliceVehicle();" and "Get Game.LocalPlayer.Character.CurrentVehicle.IsPoliceVehicle;" which both is returning True, which to me indicates that the game is at least seeing it as a police vehicle. However turning lights and sirens on does not prompt AI drivers to react appropriately, such as moving out the way of the vehicle

SOLVED: I figured out that while I had a carvariations.meta file in the mod, it was not listed in the contents.xml file for that mod. This was causing the data to not be added and resulted in the vehicles not having sirens in the base game. I run ELS and that threw me off the scent because ELS will play sirens even if the vehicle doesn't have sirens. I figured it out when "Vehicle.hasSiren" (Or whatever the method is) would return false on the vehicle. Once I found the error in content.xml, the vehicles in question began to operate properly: they could perform pullovers and traffic reacted appropriately to their sirens.

Edited by Crowmedic
Solved Problem

  • Management Team

We use Game.LocalPlayer.Character.IsInAnyPoliceVehicle to determine whether the car you are in can be used to start a pullover. If that evaluates to true, there should be no issue at least for LSPDFR.

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

  • Author

Upon further changes to my DLC.rpf, I moved the files around, assuming I may have had them in the wrong place. I'm now able to get the cars to blip a target vehicle, however, when toggling the siren on, I do not get the prompt that the vehicle has been signaled, and the target vehicle continues along its normal pathing, I'm assuming waiting for me to activate my siren. When tested against my other replacement vehicles, they perform as expected. Vehicles on road still do not react to lights/siren when activated and continue as though no emergency vehicle is present.

Edited by Crowmedic

  • The title was changed to [Addon Vehicles][Scripting][Solved]Make add-on police cars work in LSPDFR
This is a support topic.
Only reply here to offer help or assistance to Crowmedic. Off-topic or "me too" replies will be removed.

Need support yourself? Make a new topic instead.

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...

Similar Content

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.