I have encountered several frustrating instances when accidentally restarting a script that still had an open ESX UI. This situation prevents the UI from closing properly and leads to a cascade of errors, ultimately forcing a game restart. To address this issue, I propose the following code changes. The code introduces an event handler for the onResourceStop event, enabling us to loop through all open ESX UIs and identify any opened menus within the same namespace as the resource name. Following the best practice, the namespace should ideally align with the resource name. I believe implementing these changes will provide a smoother user experience. I look forward to your feedback and merging these improvements into the main branch.
ESX Legacy
Discord - Website - Documentation
Want more resources? You can browse the Cfx.re Releases board for more!
ESX is the leading framework, trusted by over 12,000 communities to provide the highest quality roleplay servers on FiveM
💗 Supporters
Interested in helping us? Take a look at our patreon
| We would like to sincerely thank the following donors who helped fund the development of ESX. |
|---|
| Mohamad Buhamad - Michael Hein - RoadToSix - Montree Narathong |
| Saydoon - Muhannad alyamani - iSentrie - Wecity - Samuel Nicol |
| Kyle McShea - Artin - Mathias Christoffersen - Jaylan Yilmaz - Callum |
| CONGRESS KW - Michael Hein - Smery sitbon - daZepelin - CMF Community |
Legal Notices |
|
ESX Core (ESX-legacy)
Copyright (C) 2015-2023 ESX-Framework This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/ |
Powered by Oxygenserv