Send information about resources state to loadscreen NUI

Hello!
It would be great if loadscreen would get NUI messages about state of resources loading.

That would make us be able to stay in loading and display status of resources loading.

For example something like:

        const handlers = {
            loadResourcesProgress(data) {
                 console.log("Client already loaded " + data.loaded + " resources out of " + data.total + "!");
            }
        };

        window.addEventListener('message', function (e) {
            (handlers[e.data.eventName] || function () {})(e.data);
        });

So we could just stay in loadscreen until all of the resources are ready and display information about current state.

You can send nui messages and shutting down the loading screen manually :

And get the resource state with:

Yes, I know about all of this natives. But you can not display informations about progress in loadscreen because loadscreen lua scripts need to load first aswell.

If it is not loaded, what kind of informations do you want to display except « not loaded »?

Not sure what exactly you’re requesting here - a counter of stages for the onLogLine event?

Currently I display loadscreen untill all resources on client side are loaded.
I have an progressbar that shows loadFraction progress from loadProgress event. But after it hits 100%, client begins to start all the scripts and I want to include that in progressbar too.

So I would need an event for that or something to know, how many resources did client already start and total count of them.

When I look at onLogLine I could maybe parse “Creating script environments for” messages - but how do I know how many resources is there in total?