shanapu / MyJailShop

MyJailShop is a redux rewrite of Dkmuniz Jail Shop and provide you a high customizable shop with credits system intended for jailbreak server.
https://forums.alliedmods.net/showthread.php?t=288712
GNU General Public License v3.0
13 stars 9 forks source link

Added a new option for credits saving #58

Open azalty opened 3 years ago

azalty commented 3 years ago

This PR adds a new option for credits saving: 'Save on each transaction and on player disconnect'

This is meant to fix an exploit where players would intentionally crash the server to duplicate credits. Since crashing the server doesn't call OnClientDisconnect(), with some knowledge you could duplicate credits. I won't exactly tell how it works because this can be used on pretty much every store/shop/credits system.

This might be heavier for the server, please only change if you experience recurring crashes and are afraid of potential credits loss/exploits due to this. but I advise running this anyways.

Player disconnect saves could be removed since we already save on each transaction, but I left it as it was since we never know.