TrevorBarns / luxart-vehicle-control

A siren / (non-els) emergency lights controller for FiveM.
https://www.luxartengineering.com/
GNU General Public License v3.0
137 stars 58 forks source link

[BUG] Vehicle names error #84

Closed NitchgamingStudios closed 1 year ago

NitchgamingStudios commented 1 year ago

Installed Version (Base and Plugin if applicable) base: 3.2.9

Describe the bug When you add a vehicle to the SIRENS.lua file to use a custom siren setting, if the vehicle name has an '_' in it, (i.e rfscat6), the sirens do not change. However when the '' is removed it fixes the issue.

To Reproduce Steps to reproduce the behavior:

  1. Add the spawncode with the '_' to the SIRENS.lua to use custom siren settings.
  2. Save and restart
  3. Spawn the vehicle and test the sirens

Expected behavior Sirens for the specified vehicle should change to follow what was done on the SIRENS.lua file

Screenshots image

TrevorBarns commented 1 year ago

Thanks for the report. Underscores in gameNames are automatically converted to spaces by GTA V. It makes sense as they don't support underscores and want to display a string to the game UI.

So if you set your key to ['rfs cat6'] it should work. I'll consider adding a replacement function to do this behind the scenes.

NitchgamingStudios commented 1 year ago

Thanks for that!. It would be great if you could try to do that!