- SUB_POINTS("bonus_payout_jackpot", getConfig('bonus_uid'), $points);
- } // END - if
- } // END - if
- break;
-
- case "UID": // ... userid's account
- // Check his amount first
- $total = GET_TOTAL_DATA(getConfig('bonus_uid'), "user_points", "points") - GET_TOTAL_DATA(getConfig('bonus_uid'), "user_data", "used_points");
- if ($total >= $points) {
- // Subtract points from userid's account
- SUB_POINTS("bonus_payout_uid", getConfig('bonus_uid'), $points);
- } else {
- // Try to subtract from jackpot
- $dummy = SUB_JACKPOT($points);
- }
- break;
- }
+ subtractPoints('bonus_payout_userid', getConfig('bonus_userid'), $points);
+ } elseif (isExtensionActive('jackpot')) {
+ // Try to subtract from jackpot
+ $dummy = subtractPointsFromJackpot($points);
+ }
+ break;
+ } // END - switch