fivem icon indicating copy to clipboard operation
fivem copied to clipboard

Cant load resource file with the manifest

Open KiLaF opened this issue 2 years ago • 5 comments

So when you try to load a resource file from the manifest using the @ it dont work

Exemple: client_script '@RESOURCE-NAME/FILE-NAME.lua'

please fix this !

KiLaF avatar Jun 11 '22 18:06 KiLaF

No reproduction steps at all? Other resources use this perfectly fine without any issue (like oxmysql & mysql)

AvarianKnight avatar Jun 11 '22 18:06 AvarianKnight

Your report is incomplete/invalid. As @AvarianKnight said, it works as expected, just tested myself.

Disquse avatar Jun 11 '22 21:06 Disquse

Given the lack of information and making some leaps in logic:

Should https://github.com/citizenfx/fivem/blob/master/code/components/citizen-server-impl/src/ServerResources.cpp#L88 (fragRef) include a skyr::percent_decode? (Similarly on client, although, in a few more spots)

gottfriedleibniz avatar Jun 11 '22 22:06 gottfriedleibniz

So when you try to load a resource file from the manifest using the @ it dont work

Exemple: client_script '@RESOURCE-NAME/FILE-NAME.lua'

please fix this !

So my question is, did you load client_script 'file.lua' within the resource that you load it from because on the server side you can load server files within other resources without having to load them within the resource it self. how ever on the client side this is a diffrent story.

so lets say you got resource_a and resource_b and you want to load a file of resource_b within resource_a then you need to load resource_b before resource_a and you need to load the file on the client side at resource_a and resource_b. I'm not sure because i didn't test it any furter then this but i believe that its also not posible to load it shared on one of both sides you need to load it separetly.

With that being said,

server.cfg

ensure resource_b
ensure resource_a

resource_b/fxmanifest.lua

client_script 'client.lua'

resource_a/fxmanifest.lua

client_script '@resource_b/client.lua'

5m1Ly avatar Aug 23 '22 01:08 5m1Ly

So i tested it and it also works shared, but then again you need to load it bought at the resources the file originates from and the resource where you want load the file.

5m1Ly avatar Aug 26 '22 20:08 5m1Ly

Marking as stale. If still an issue, please reopen.

gottfriedleibniz avatar Feb 11 '24 22:02 gottfriedleibniz