{"hash":"0xE7490533","ns":"CFX","name":"REQUEST_RESOURCE_FILE_SET","slug":"REQUEST_RESOURCE_FILE_SET","official":true,"named":true,"luaName":"RequestResourceFileSet","game":"cfx","apiset":"client","returnType":"BOOL","params":[{"name":"setName","type":"char*","description":"The name of the file set as specified in `fxmanifest.lua`."}],"returnsDescription":"`TRUE` if the set is mounted, `FALSE` if the request is still pending.","summary":"Requests a resource file set with the specified name to be downloaded and mounted on top of the current resource.","descriptions":[{"source":"cfx","format":"md","body":"Requests a resource file set with the specified name to be downloaded and mounted on top of the current resource.\n\nResource file sets are specified in `fxmanifest.lua` with the following syntax:\n\n```lua\nfile_set 'addon_ui' {\n    'ui/addon/index.html',\n    'ui/addon/**.js',\n}\n```\n\nThis command will trigger a script error if the request failed."}],"examples":[{"lang":"lua","code":"-- fxmanifest.lua\nfile_set 'dummies' {\n    'dummy/**.txt',\n    'potato.txt',\n}\n\n-- main script\nlocal function PrintTest()\n    local tests = { 'potato.txt', 'dummy/1.txt', 'dummy/b/2.txt' }\n\n    for _, v in ipairs(tests) do\n        local data = LoadResourceFile(GetCurrentResourceName(), v)\n        print(v, data)\n    end\nend\n\nRegisterCommand('fileset', function()\n    PrintTest()\n\n    while not RequestResourceFileSet('dummies') do\n        Wait(100)\n    end\n\n    PrintTest()\nend)","source":"cfx"}],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/REQUEST_RESOURCE_FILE_SET","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/REQUEST_RESOURCE_FILE_SET.md","snippets":{"lua":"local retval = RequestResourceFileSet(setName)","luaInvoke":"local retval = Citizen.InvokeNative(0xe7490533, setName, Citizen.ReturnResultAnyway())","js":"const retval = RequestResourceFileSet(setName);","jsInvoke":"const retval = Citizen.invokeNative('0xe7490533', setName, Citizen.returnResultAnyway());","csharp":"bool retval = Function.Call<bool>((Hash)0xe7490533, setName);","notes":[]}}