{"hash":"0x3A0B667ABFF87F6E","ns":"ITEMDATABASE","name":"_ITEMDATABASE_GET_BUNDLE_ACQUIRE_COST","slug":"_ITEMDATABASE_GET_BUNDLE_ACQUIRE_COST","official":false,"named":true,"luaName":"ItemdatabaseGetBundleAcquireCost","game":"rdr3","apiset":"client","returnType":"BOOL","params":[{"name":"bundle","type":"Hash"},{"name":"index","type":"int"},{"name":"outData","type":"Any*"}],"summary":"Fills out acquire-cost data for a bundle entry.","descriptions":[{"source":"alloc8or","format":"text","body":"Fills out acquire-cost data for a bundle entry.\nUse index with _ITEMDATABASE_GET_BUNDLE_ACQUIRE_COSTS_COUNT.\n\noutData:\nstruct AcquireCost\n{\n\talignas(8) Hash cost;\n\talignas(8) Any  p1;\n\talignas(8) Hash costType;\n\talignas(8) int  numCosts;\n\talignas(8) int  p4;\n\talignas(8) Any* costs; // array of Cost entries\n};\n\nstruct Cost\n{\n\talignas(8) Hash currency;\n\talignas(8) int  amount;\n};"},{"source":"vorp","format":"text","body":"eg: BUNDLE_CLOTHING_ITEM_F_OFFHAND_000_TINT_001 index: To use with 0x7A35A72A692BE9DB"}],"examples":[{"lang":"lua","code":"struct outData {\n  Hash cost;\n  Any unk1; // Maybe bool, int otherwise\n  Hash costType;\n  int numCosts;\n  int unk2;\n  Any* costs; // Array of costs\n};\n\nstruct Cost {\n  Hash currency;\n  int amount;\n};","source":"vorp"}],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":3,"url":"https://natives.borderlinerp.com/natives/ITEMDATABASE/_ITEMDATABASE_GET_BUNDLE_ACQUIRE_COST","markdownUrl":"https://natives.borderlinerp.com/natives/ITEMDATABASE/_ITEMDATABASE_GET_BUNDLE_ACQUIRE_COST.md","snippets":{"lua":"local retval, outData = ItemdatabaseGetBundleAcquireCost(bundle, index, outData)","luaInvoke":"local retval, outData = Citizen.InvokeNative(0x3A0B667ABFF87F6E, bundle, index, Citizen.PointerValueIntInitialized(outData), Citizen.ReturnResultAnyway())","js":"const [retval, outData] = ItemdatabaseGetBundleAcquireCost(bundle, index, outData);","jsInvoke":"const [retval, outData] = Citizen.invokeNative('0x3A0B667ABFF87F6E', bundle, index, Citizen.pointerValueIntInitialized(outData), Citizen.returnResultAnyway());","csharp":"var outData = new OutputArgument();\nbool retval = Function.Call<bool>((Hash)0x3A0B667ABFF87F6E, bundle, index, outData);\n// outData.GetResult<int>()","notes":["Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat(\"name\")` or a backtick literal like `` `name` ``.","The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.","`Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.","The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works."]}}