A pretty simple way is to have a few other variables that should 'match' the one you want to prevent from being hacked. EG:
Code: Select all
Money = 5000
repeat
a = money * 12052 ; random number
b = money * 195
; Do money-related stuff
; If a trainer has changed the value of Money, this 'if' should trigger
if a <> money * 12052 or b <> money * 195
debug "Money has been hacked!"
endif
forever
I'm not sure if this works, but I would guess that it'd be more reliable if you put it inside a thread, since you don't know what part of execution your program will be at when the values are changed.
I think it's also possible to register certain security measures that tell Windows not to give any other programs access to the memory of yours. No idea how, though
