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.

Manipulate ELS through code?

Featured Replies

Is it possible to manipulate ELS through code?  Specifically to turn on and off the different sirens?  The IsSirenSilent and IsSirenOn vehicle properties are only affected by stage 3 lights, not sirens.  The native "SET_VEHICLE_SIREN" will turn siren tone 1 on if lights are off, blip if stage 1 or stage 2 lights are on, and do nothing if stage 3 lights are on.  The native "_IS_VEHICLE_SIREN_SOUND_ON" will either crash RPH or GTA V depending on if it's used when stage 3 lights are on or off.

Released plugins

Rich's Police EnhancementsScene Manager | Rich Ambiance

Retired?

On 7/4/2019 at 12:41 PM, Rich said:

The native "_IS_VEHICLE_SIREN_SOUND_ON" will either crash

Are you calling _IS_VEHICLE_SIREN_SOUND_ON or it's hash?

natives with a underscore in front of them are guess names so you have to use the hash. In this case xB5CC40FBCB586380.

 

You should also use NativeFunction.Natives as CallByName and others are deprecated.

Capture.thumb.PNG.1443fd03484707124a280153c5e167d0.PNG

  • Author

Thanks for the info, I wasn't aware of that.  After implementing that native as suggested, it no longer crashes, but it doesn't seem to be affected by lights or sirens.  Am I doing this wrong?

if (Rage.Native.NativeFunction.Natives.xB5CC40FBCB586380<bool>(playerVehicle) == true)
{
  Game.DisplaySubtitle("Siren sound is on");
}
else
{
  Game.DisplaySubtitle("Siren sound is off");
}

It never returns true.  I've found that if I check if a player is in a vehicle, then execute 

(Rage.Native.NativeFunction.Natives.SetVehicleSiren(playerVehicle, true))

The siren will play until the player exits the vehicle.  This is close to what I'm trying to do, but I do not want to always have the siren set while the player is in the vehicle.  If I instead try to execute that line of code as false if the player is no longer in the vehicle (after the player turned the siren on themselves) the siren will not turn off.

Edited by Rich

Released plugins

Rich's Police EnhancementsScene Manager | Rich Ambiance

Retired?

On 7/6/2019 at 12:13 PM, Rich said:

Thanks for the info, I wasn't aware of that.  After implementing that native as suggested, it no longer crashes, but it doesn't seem to be affected by lights or sirens.  Am I doing this wrong?


if (Rage.Native.NativeFunction.Natives.xB5CC40FBCB586380<bool>(playerVehicle) == true)
{
  Game.DisplaySubtitle("Siren sound is on");
}
else
{
  Game.DisplaySubtitle("Siren sound is off");
}

It never returns true.  I've found that if I check if a player is in a vehicle, then execute 


(Rage.Native.NativeFunction.Natives.SetVehicleSiren(playerVehicle, true))

The siren will play until the player exits the vehicle.  This is close to what I'm trying to do, but I do not want to always have the siren set while the player is in the vehicle.  If I instead try to execute that line of code as false if the player is no longer in the vehicle (after the player turned the siren on themselves) the siren will not turn off.

 

 

try this:

 

if (Rage.Native.NativeFunction.CallByHash<bool>(xB5CC40FBCB586380, playerVehicle) == true)
{
  Game.DisplaySubtitle("Siren sound is on");
}
else
{
  Game.DisplaySubtitle("Siren sound is off");
}

and I don't think we can control the ELS sound through the Native API.

we can turn on/off lights but not the sound.

sound will always follow the lights.. if lights on, then the siren sound will be forced on.

(e.g. we can't have lights on and sound off)

 

Edited by Pazzi

  • Author
17 hours ago, Pazzi said:

I don't think we can control the ELS sound through the Native API.

we can turn on/off lights but not the sound.

sound will always follow the lights.. if lights on, then the siren sound will be forced on.

(e.g. we can't have lights on and sound off)

 

I appreciate you taking the time to help.

Released plugins

Rich's Police EnhancementsScene Manager | Rich Ambiance

Retired?

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.