SetArtificialLightsState Crash

WARNING

If you post here without knowing what you’re doing you’ll most likely get suspended, you should probably post in client-support instead.


Description: Was first reported in the discord by user “royaltheone”. But using the native SetArtificialLightsState sometimes crashes
Server artifact version: 7037
Expected behavior: It wont crash the player
Current behavior: Crashed Player
Error screenshot:
image

.dmp/crash files:
CfxCrashDump_2023_11_29_00_55_39.zip (2.3 MB)

Files/Code to reproduce bug:

RegisterCommand("lightON", function (source, args)
    SetArtificialLightsState(false)
  end)
  RegisterCommand("lightOFF", function (source, args)
    SetArtificialLightsState(true)
  end)

Extra information: N/A

I guess it’s finally the time to fix it. Will be investigated shortly.

Here’s a PR that meant to fix this issue.

3 Likes

Thank u :heart_eyes: :heart: