ztizzlegaming / CSGOWinBig

Open-source Counter-Strike: Global Offensive jackpot betting website.
MIT License
170 stars 104 forks source link

Changing fee on site #91

Closed rfalkner closed 8 years ago

rfalkner commented 8 years ago

I would like to change the fee from 2% to 10% on my site.

How do i do this?

I believe its somewhere in this code:

foreach ($allItems as $item) { if ($give) { array_push($itemsToGive, $item); continue; }

    $itemPrice = intval($item['itemPrice']);
    $itemPercentage = $itemPrice / $totalPotPrice;

    if ($keepPercentage + $itemPercentage > 0.05) {
        array_push($itemsToGive, $item);
        $give = true;
        continue;
    }

    if ($keepPercentage + $itemPercentage >= 0.02 && $keepPercentage < 0.02) {
        array_push($itemsToKeep, $item);
        $give = true;
        continue;
    }

    array_push($itemsToKeep, $item);
    $keepPercentage += $itemPercentage;
}
Xeroner commented 8 years ago

if ($keepPercentage + $itemPercentage > 0.05) { array_push($itemsToGive, $item); $give = true; continue; }

if ($keepPercentage + $itemPercentage >= 0.02 && $keepPercentage < 0.02) {
    array_push($itemsToKeep, $item);
    $give = true;
    continue;
}
Xeroner commented 8 years ago

change 0.02 to yours and 0.05 to yours