This function can be used for clearing the purchase status of any unmanaged (consumable) purchases. The "purchase_id" is the product ID string which you specified when activating the IAP using iap_activate, and should be the same as that which you used to identify the product on the target store. This function will trigger an IAP Event of the "type" iap_ev_consume, which will contain the following additional keys:
- "product" - The product ID for the consumed product.
This product ID can then be used to check which purchase has triggered the event, and you can deal with it accordingly.WARNING! You cannot purchase a consumable product multiple times in a row without consumption - you must perform a consume operation between subsequent purchases.
iap_consume(purchase_id);
Argument | Description |
---|---|
purchase_id | The product ID string for the purchase. |
N/A
if mouse_check_button_pressed(mb_left)
{
iap_consume("noads")
}
The above code will clear the purchase status when the mouse button is pressed.