From 438e25e7d7239ef7fc379a2102a444cd25caf9c0 Mon Sep 17 00:00:00 2001 From: Damen Date: Wed, 10 Apr 2019 12:06:10 -0400 Subject: [PATCH] attempt to fix casino point theft --- gamemodes/irresistible/cnr/features/visage/rewardspoints.pwn | 1 + 1 file changed, 1 insertion(+) diff --git a/gamemodes/irresistible/cnr/features/visage/rewardspoints.pwn b/gamemodes/irresistible/cnr/features/visage/rewardspoints.pwn index 8ad61f6..1af1694 100644 --- a/gamemodes/irresistible/cnr/features/visage/rewardspoints.pwn +++ b/gamemodes/irresistible/cnr/features/visage/rewardspoints.pwn @@ -213,6 +213,7 @@ CMD:casino( playerid, params[ ] ) /* ** Functions ** */ stock GivePlayerCasinoRewardsPoints( playerid, bet_amount, Float: house_edge ) { + if ( bet_amount == 0 ) return 1; if ( bet_amount < 0 ) bet_amount *= -1; // profit or loss, does not matter // printf("(%f * ((%f * 100.0) * (%f / 100.0))) / %f\n",bet_amount, house_edge, CASINO_REWARDS_PAYOUT_PERCENT, CASINO_REWARDS_DIVISOR); new Float: final_points = ( bet_amount * ( ( house_edge / 100.0 ) * ( CASINO_REWARDS_PAYOUT_PERCENT / 100.0 ) ) ) / CASINO_REWARDS_DIVISOR;