{"hash":"0x7995539E","ns":"CFX","name":"LOAD_PLAYER_COMMERCE_DATA_EXT","slug":"LOAD_PLAYER_COMMERCE_DATA_EXT","official":true,"named":true,"luaName":"LoadPlayerCommerceDataExt","game":"cfx","apiset":"server","returnType":"void","params":[{"name":"playerSrc","type":"char*","description":"The player handle"}],"summary":"Requests the commerce data from Tebex for the specified player, including the owned SKUs.","descriptions":[{"source":"cfx","format":"md","body":"Requests the commerce data from Tebex for the specified player, including the owned SKUs.\n\nUse [`IS_PLAYER_COMMERCE_INFO_LOADED_EXT`](#\\_0x1D14F4FE) to check if it has loaded.\n\nThis will not automatically update whenever a client purchases a package, if you want to fetch new purchases you will need to call this native again.\n\nThis native will temporarily cache the players commerce data for 10 seconds, a call to this native after 10 seconds will re-fetch the players commerce data."}],"examples":[{"lang":"lua","code":"RegisterNetEvent(\"doesOwnPackage\", function(packageIdSku)\n\t-- source isn't valid across waits, so we localize it\n\tlocal source = source\n\n\t-- input isn't right\n\tif type(packageIdSku) ~= \"number\" then\n\t\treturn\n\tend\n\n\t-- The native will cache the results\n\tLoadPlayerCommerceDataExt(source)\n\t-- Wait for the players data to load\n\twhile not IsPlayerCommerceInfoLoadedExt(source) do\n\t\tWait(0)\n\tend\n\n\t-- Tell the client if they own the package or not\n\tTriggerClientEvent(\"doesOwnPackage\", source, DoesPlayerOwnSkuExt(source, packageIdSku))\nend)","source":"cfx"}],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/LOAD_PLAYER_COMMERCE_DATA_EXT","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/LOAD_PLAYER_COMMERCE_DATA_EXT.md","snippets":{"lua":"LoadPlayerCommerceDataExt(playerSrc)","luaInvoke":"Citizen.InvokeNative(0x7995539e, playerSrc)","js":"LoadPlayerCommerceDataExt(playerSrc);","jsInvoke":"Citizen.invokeNative('0x7995539e', playerSrc);","csharp":"Function.Call((Hash)0x7995539e, playerSrc);","notes":[]}}