mtasa-resources icon indicating copy to clipboard operation
mtasa-resources copied to clipboard

sirenEdit doesn't work properly

Open Fernando-A-Rocha opened this issue 1 year ago • 2 comments

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

Fernando-A-Rocha avatar Jul 03 '24 11:07 Fernando-A-Rocha

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 avatar Jul 03 '24 11:07 T-MaxWiese-T

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.

T-MaxWiese-T avatar Jul 03 '24 12:07 T-MaxWiese-T

Fixed in https://github.com/multitheftauto/mtasa-resources/commit/e4b73cb55fa6fd23a6fb6e0831507500d4794690

ArranTuna avatar Sep 20 '25 14:09 ArranTuna