matsn0w / MISS-ELS

Server-sided ELS for FiveM with custom patterns per vehicle, custom sirens, indicator control and more!
https://matsn0w.github.io/MISS-ELS
17 stars 14 forks source link

`vehicle` is nil when player B is far away from player A #99

Open matsn0w opened 2 years ago

matsn0w commented 2 years ago

Describe the bug When player B is far away from player A, player A will get an error because vehicle on line 134 is nil. This happens when player B toggles their lights or sirens on/off.

This issue doesn't appear when both players are near.

This probably also applies to some other parts of the code.

To Reproduce Steps to reproduce the behavior:

  1. Player A: teleport to Zancudo
  2. Player B: teleport to LS Airport
  3. Player A: monitor F8 console
  4. Player B: toggle lights or sirens
  5. Player A: take notice of the error

Additional context FiveM build: 5104 MISS ELS version: 2.1.1

Relevant Discord thread: https://discord.com/channels/941403205064073246/950796981935161364

FBFezz commented 2 years ago

Also get this error, also looks like the lights dont appear correctly on both players screens

matsn0w commented 2 years ago

Also get this error, also looks like the lights dont appear correctly on both players screens

That's correct, see #41