most likely the way they would check in single player is having redundant data and/or hash checks on what kinds of resources you've collected and spent and how much you've done so, so if the check value doesn't match the actual value, that's a pretty good chance someone edited the resource value with a trainer or a memory editor
multi would be even easier since trainers only work on local memory so if the data values on the client side didn't match up with the server values, you've either got lag or memory editing