{"hash":"0x285B43CA","ns":"CFX","name":"REGISTER_RESOURCE_BUILD_TASK_FACTORY","slug":"REGISTER_RESOURCE_BUILD_TASK_FACTORY","official":true,"named":true,"luaName":"RegisterResourceBuildTaskFactory","game":"cfx","apiset":"server","returnType":"void","params":[{"name":"factoryId","type":"char*","description":"The identifier for the build task."},{"name":"factoryFn","type":"func","description":"The factory function."}],"summary":"Registers a build task factory for resources.","descriptions":[{"source":"cfx","format":"md","body":"Registers a build task factory for resources.\nThe function should return an object (msgpack map) with the following fields:\n\n```\n{\n// returns whether the specific resource should be built\nshouldBuild = func(resourceName: string): bool,\n\n// asynchronously start building the specific resource.\n// call cb when completed\nbuild = func(resourceName: string, cb: func(success: bool, status: string): void): void\n}\n```"}],"examples":[],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":2,"url":"https://natives.borderlinerp.com/natives/CFX/REGISTER_RESOURCE_BUILD_TASK_FACTORY","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/REGISTER_RESOURCE_BUILD_TASK_FACTORY.md","snippets":{"lua":"RegisterResourceBuildTaskFactory(factoryId, factoryFn)","luaInvoke":"Citizen.InvokeNative(0x285b43ca, factoryId, factoryFn)","js":"RegisterResourceBuildTaskFactory(factoryId, factoryFn);","jsInvoke":"Citizen.invokeNative('0x285b43ca', factoryId, factoryFn);","csharp":"Function.Call((Hash)0x285b43ca, factoryId, factoryFn);","notes":[]}}