There is gms_protect_set and gms_protect_get, which I seem to have left completely undocumented for some reason. The idea is that you save a copy of important variables (xp, money, etc) using gms_protect_set(num, variable) every time the variable changes. (num is a number between 0 and 10240 to identify the value that you're storing)
Then, you continuously check whether gms_protect_get(num) == variable and if not, shut down the game, post a "I am cheating message" in chat, or whatever you want.
Everything stored in gms_protect_* is protected from basic memory scanning, like what you usually do in Cheat Engine. So you can use it to continually verify that the variable hasn't been changed by something outside your game. Obviously not unbreakable, but it will stop people that don't truely understand what they're doing.
It only supports whole numbers, so if you have floating point numbers you will want to save round(val), and check for abs(gms_protect_get(num) - val) <= 0.6.
10 Apr 2020, 06:09:35