fivem
fivem copied to clipboard
Cant load resource file with the manifest
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 !
No reproduction steps at all? Other resources use this perfectly fine without any issue (like oxmysql & mysql)
Your report is incomplete/invalid. As @AvarianKnight said, it works as expected, just tested myself.
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)
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'
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.
Marking as stale. If still an issue, please reopen.