23.05.2011, 16:29
add a check for the players client money compared to your server money variable
if the client (game) GetPlayerMoney is bigger, then the player cheated.
if its smaller, then set the serversided variable to the one you got from the client. no cheater will set his money to $0 i bet...
if the client (game) GetPlayerMoney is bigger, then the player cheated.
if its smaller, then set the serversided variable to the one you got from the client. no cheater will set his money to $0 i bet...
Code:
forward MoneyHack();public MoneyHack(){ new ClientCash; foreach(Player, i) { ClientCash=GetPlayerMoney(i); if(ClientCash < GetPlayerCash(i))//like a SyncPlayerServerMoneyToClientMoneyWhenBoughtSomethin() { SetPlayerCash(i, ClientCash); } else if(ClientCash > GetPlayerCash(i)) { //player got too much cash :) } } return 1; }