multitheftauto / mtasa-resources

This project maintains a list of up-to-date resources that come with Multi Theft Auto.
https://multitheftauto.com
MIT License
154 stars 157 forks source link

sirenEdit doesn't work properly #509

Open Fernando-A-Rocha opened 4 months ago

Fernando-A-Rocha commented 4 months ago

Which resource(s) have this problem? sirenEdit

Describe the bug It's missing the cpicker resource and doing /sirens in certains vehicles will cause an error in the initUI function in script.lua.

To Reproduce start sirenEdit enter a Police LV car use /sirens => error occurs click Colour button => error occurs

Expected behavior no errors (robust script to handle all cases), and a working color picker

Screenshots image

Version Multi Theft Auto v1.6-release-22596 Latest MTA default resources as of posting this

T-MaxWiese-T commented 4 months ago

Regarding the resource "cpicker". You can find it here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3247 . However, I do not know what the copyright situation is as to whether the resource may be added to the mtasa-resources repository. An alternative would perhaps be to use the colorpicker in the "freeroam" resource as a template or to outsource the colorpicker to a separate resource so that all resources can access it via functions as with the "cpicker" resource.

T-MaxWiese-T commented 4 months ago

I think the reason why an error was displayed is because you did not select a siren type. But the resource is not very user friendly and errors should be displayed in the GUI or in the chat.