Improve behavior of the AddPlayerResources function