ox_lib icon indicating copy to clipboard operation
ox_lib copied to clipboard

[Suggestion] Event for Settings Change

Open Rossebma opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. Not really a problem but a minor inconvenience. I created a localized radial menu. In order to update it, I have to redefine it. No problem there. But executing the redefinition after a locale change was tricky. What I'd like (if not already in the newer versions) would be what I will in show in the solution.

Describe the solution you'd like I added the following line at the end of the command in ./resource/settings.lua:

TriggerEvent('ox_lib:settings:update', settings)

This allows me to handle a settings change everywhere and it works great for me at least.

Thanks for reading and have a nice day. :D

Rossebma avatar Feb 27 '25 03:02 Rossebma

There's an event specifically for locales, ox_lib:setLocale. The other settings shouldn't be relevant.

thelindat avatar Mar 10 '25 03:03 thelindat