From d1839a185c847f29100d6e739997d269d6a91e16 Mon Sep 17 00:00:00 2001 From: mblokker Date: Mon, 22 Aug 2016 14:49:19 +0200 Subject: [PATCH] First reset the player's money, and then give them the expected amount. Apparently the gamemode does not register the money change if only the amount is being given to the player. This way, Casino kept paying out. Fixes #250 --- pawn/Entities/Financial/Anticheat/PlayerMoneyState.pwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pawn/Entities/Financial/Anticheat/PlayerMoneyState.pwn b/pawn/Entities/Financial/Anticheat/PlayerMoneyState.pwn index 58c47ea5d..090999348 100644 --- a/pawn/Entities/Financial/Anticheat/PlayerMoneyState.pwn +++ b/pawn/Entities/Financial/Anticheat/PlayerMoneyState.pwn @@ -165,7 +165,8 @@ class PlayerMoneyState { // Now re-synchronize the amount of money with the player, based on what we think they // should be having right now. Reset their money first, then give them the new amount. - GivePlayerMoneyPrivate(playerId, amount); + ResetPlayerMoneyPrivate(playerId); + GivePlayerMoneyPrivate(playerId, m_cash); // Report this change to the money indicator, so we can give them visual feedback of what // happened. We won't show the indicator if this is a discrete money change.