make code consistent in anti money hack module

This commit is contained in:
Lorenc Pekaj 2019-01-02 03:01:53 +11:00
parent 18eb6c9ca6
commit 70b04977ca

View File

@ -23,9 +23,11 @@ static stock
forward OnPlayerMoneyChanged ( playerid, amount ); forward OnPlayerMoneyChanged ( playerid, amount );
/* ** Hooks ** */ /* ** Hooks ** */
hook OnPlayerUpdate( playerid ) { hook OnPlayerUpdate( playerid )
{
// reset the player's money if it is inaccurate // reset the player's money if it is inaccurate
if ( p_Cash[ playerid ] != GetPlayerMoney( playerid ) ) { if ( p_Cash[ playerid ] != GetPlayerMoney( playerid ) )
{
ResetPlayerMoney( playerid ); ResetPlayerMoney( playerid );
GivePlayerMoney( playerid, p_Cash[ playerid ] ); GivePlayerMoney( playerid, p_Cash[ playerid ] );
} }